Fix Typos

This commit is contained in:
Romain Neutron
2012-04-28 13:40:37 +02:00
parent 6911718c46
commit 005937fdc3
9 changed files with 335 additions and 302 deletions

View File

@@ -213,7 +213,7 @@ class ControllerRssFeedTest extends \PhraseanetWebTestCaseAbstract
protected function evaluateAtom(Response $response)
{
$dom_doc = new DOMDocument();
$doc->preserveWhiteSpace = false;
$dom_doc->preserveWhiteSpace = false;
$dom_doc->loadXML($response->getContent());
$xpath = new DOMXPath($dom_doc);

View File

@@ -19,7 +19,7 @@ class Feed_XML_RSS_ImageTest extends PhraseanetPHPUnitAbstract
public function setUp()
{
parent::setUp();
$this->this->link = 'http://www.example.org';
$this->link = 'http://www.example.org';
$this->title = 'Un beau titre';
$this->url = 'http://www.example.org/image.jpg';
$this->width = 42;

View File

@@ -4,206 +4,220 @@ require_once __DIR__ . '/../PhraseanetPHPUnitAbstract.class.inc';
class http_requestTest extends PHPUnit_Framework_TestCase
{
/**
* @var http_request
*/
protected $object;
/**
* @var http_request
*/
protected $object;
protected function setUp()
{
$this->object = new http_request();
}
protected function setUp()
{
$this->object = new http_request();
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}
}
/**
* @todo Implement testGetInstance().
*/
public function testGetInstance()
{
$this->assertInstanceOf('http_request', http_request::getInstance());
}
/**
* @todo Implement testGetInstance().
*/
public function testGetInstance()
{
$this->assertInstanceOf('http_request', http_request::getInstance());
}
/**
* @todo Implement testIs_ajax().
*/
public function testIs_ajax()
{
$this->assertFalse($this->object->is_ajax());
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest';
$this->assertTrue($this->object->is_ajax());
}
/**
* @todo Implement testIs_ajax().
*/
public function testIs_ajax()
{
$this->assertFalse($this->object->is_ajax());
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest';
$this->assertTrue($this->object->is_ajax());
}
/**
* @todo Implement testComes_from_flash().
*/
public function testComes_from_flash()
{
$user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : null;
$this->assertFalse($this->object->comes_from_flash());
$_SERVER['HTTP_USER_AGENT'] = 'Shockwave Flash';
$this->assertTrue($this->object->comes_from_flash());
$_SERVER['HTTP_USER_AGENT'] = 'Shockwave Flash Player';
$this->assertTrue($this->object->comes_from_flash());
$_SERVER['HTTP_USER_AGENT'] = 'Adobe Flash Player';
$this->assertTrue($this->object->comes_from_flash());
$_SERVER['HTTP_USER_AGENT'] = 'Adobe Flash Player 10';
$this->assertTrue($this->object->comes_from_flash());
$_SERVER['HTTP_USER_AGENT'] = 'Flash';
$this->assertTrue($this->object->comes_from_flash());
$_SERVER['HTTP_USER_AGENT'] = 'Flash Player';
$this->assertTrue($this->object->comes_from_flash());
$_SERVER['HTTP_USER_AGENT'] = 'Flash ';
$this->assertTrue($this->object->comes_from_flash());
$_SERVER['HTTP_USER_AGENT'] = 'Flashs ';
$this->assertFalse($this->object->comes_from_flash());
$_SERVER['HTTP_USER_AGENT'] = $user_agent;
$this->assertFalse($this->object->comes_from_flash());
}
/**
* @todo Implement testComes_from_flash().
*/
public function testComes_from_flash()
{
$user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : null;
$this->assertFalse($this->object->comes_from_flash());
$_SERVER['HTTP_USER_AGENT'] = 'Shockwave Flash';
$this->assertTrue($this->object->comes_from_flash());
$_SERVER['HTTP_USER_AGENT'] = 'Shockwave Flash Player';
$this->assertTrue($this->object->comes_from_flash());
$_SERVER['HTTP_USER_AGENT'] = 'Adobe Flash Player';
$this->assertTrue($this->object->comes_from_flash());
$_SERVER['HTTP_USER_AGENT'] = 'Adobe Flash Player 10';
$this->assertTrue($this->object->comes_from_flash());
$_SERVER['HTTP_USER_AGENT'] = 'Flash';
$this->assertTrue($this->object->comes_from_flash());
$_SERVER['HTTP_USER_AGENT'] = 'Flash Player';
$this->assertTrue($this->object->comes_from_flash());
$_SERVER['HTTP_USER_AGENT'] = 'Flash ';
$this->assertTrue($this->object->comes_from_flash());
$_SERVER['HTTP_USER_AGENT'] = 'Flashs ';
$this->assertFalse($this->object->comes_from_flash());
$_SERVER['HTTP_USER_AGENT'] = $user_agent;
$this->assertFalse($this->object->comes_from_flash());
}
/**
* @todo Implement testGet_code().
*/
public function testGet_code()
{
$this->assertNull($this->object->get_code());
$_SERVER['REDIRECT_STATUS'] = 301;
$this->assertEquals(301, $this->object->get_code());
$this->object->set_code(580);
$this->assertEquals(580, $this->object->get_code());
$this->object->set_code('a');
$this->assertEquals(0, $this->object->get_code());
$this->object->set_code('a');
$this->assertEquals(0, $this->object->get_code());
}
/**
* @todo Implement testGet_code().
*/
public function testGet_code()
{
$this->assertNull($this->object->get_code());
$_SERVER['REDIRECT_STATUS'] = 301;
$this->assertEquals(301, $this->object->get_code());
$this->object->set_code(580);
$this->assertEquals(580, $this->object->get_code());
$this->object->set_code('a');
$this->assertEquals(0, $this->object->get_code());
$this->object->set_code('a');
$this->assertEquals(0, $this->object->get_code());
}
/**
* @todo Implement testSet_code().
*/
public function testSet_code()
{
$this->object->set_code(302);
$this->assertEquals(302, $this->object->get_code());
}
/**
* @todo Implement testSet_code().
*/
public function testSet_code()
{
$this->object->set_code(302);
$this->assertEquals(302, $this->object->get_code());
}
/**
* @todo Implement testGet_parms().
*/
public function testGet_parms()
{
$_GET = array('lili' => '25', 'popo' => array('tip', 'top'));
$_POST = array('Plili' => '25', 'Gpopo' => array('mtip', 'btop'));
/**
* @todo Implement testGet_parms().
*/
public function testGet_parms()
{
$_GET = array('lili' => '25', 'popo' => array('tip', 'top'));
$_POST = array('Plili' => '25', 'Gpopo' => array('mtip', 'btop'));
$parm = $this->object->get_parms('lili', 'Plili', 'popo', 'Gpopo', 'notexists');
$this->assertEquals($_GET['lili'], $parm['lili']);
$this->assertEquals($_POST['Plili'], $parm['Plili']);
$this->assertEquals($_GET['popo'], $parm['popo']);
$this->assertEquals($_POST['Gpopo'], $parm['Gpopo']);
$this->assertNull($parm['notexists']);
$parm = $this->object->get_parms('lili', 'Plili', 'popo', 'Gpopo', 'notexists');
$parm = $this->object->get_parms(
$this->assertEquals($_GET['lili'], $parm['lili']);
$this->assertEquals($_POST['Plili'], $parm['Plili']);
$this->assertEquals($_GET['popo'], $parm['popo']);
$this->assertEquals($_POST['Gpopo'], $parm['Gpopo']);
$this->assertNull($parm['notexists']);
$parm = $this->object->get_parms(
array(
'lili' => http_request::SANITIZE_NUMBER_INT
'lili' => http_request::SANITIZE_NUMBER_INT
, 'Plili'
, 'popo'
, 'Gpopo' => http_request::SANITIZE_STRING
, 'notexists' => http_request::SANITIZE_STRING
)
);
);
$this->assertEquals((int)$_GET['lili'], $parm['lili']);
$this->assertTrue(is_int($parm['lili']));
$this->assertEquals($_POST['Plili'], $parm['Plili']);
$this->assertEquals($_GET['popo'], $parm['popo']);
$this->assertEquals('Array', $parm['Gpopo']);
$this->assertEquals('',$parm['notexists']);
$this->assertEquals((int) $_GET['lili'], $parm['lili']);
$this->assertTrue(is_int($parm['lili']));
$this->assertEquals($_POST['Plili'], $parm['Plili']);
$this->assertEquals($_GET['popo'], $parm['popo']);
$this->assertEquals('', $parm['notexists']);
$_GET = $_POST = array();
}
$_GET = $_POST = array();
}
/**
* @todo Implement testGet_parms_from_serialized_datas().
*/
public function testGet_parms_from_serialized_datas()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
public function testGet_parmsArraToString()
{
$_POST = array('Plili' => '25', 'Gpopo' => array('mtip', 'btop'));
try {
$this->object->get_parms(array('Gpopo' => http_request::SANITIZE_STRING));
if (version_compare(PHP_VERSION, '5.4', '>=')) {
$this->fail('Should raise an error notice');
}
} catch (\PHPUnit_Framework_Error_Notice $e) {
}
$_GET = $_POST = array();
}
/**
* @todo Implement testGet_parms_from_serialized_datas().
*/
public function testGet_parms_from_serialized_datas()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
);
}
/**
* @todo Implement testHas_post_datas().
*/
public function testHas_post_datas()
{
$this->assertFalse($this->object->has_post_datas());
$_POST = array('TOPPy'=>null);
$this->assertTrue($this->object->has_post_datas());
}
/**
* @todo Implement testHas_post_datas().
*/
public function testHas_post_datas()
{
$this->assertFalse($this->object->has_post_datas());
$_POST = array('TOPPy' => null);
$this->assertTrue($this->object->has_post_datas());
}
/**
* @todo Implement testGet_post_datas().
*/
public function testGet_post_datas()
{
$post = $_POST = array('Plili' => '25', 'Gpopo' => array('mtip', 'btop'));
$this->assertEquals($post, $this->object->get_post_datas());
}
/**
* @todo Implement testGet_post_datas().
*/
public function testGet_post_datas()
{
$post = $_POST = array('Plili' => '25', 'Gpopo' => array('mtip', 'btop'));
$this->assertEquals($post, $this->object->get_post_datas());
}
/**
* @todo Implement testHas_get_datas().
*/
public function testHas_get_datas()
{
$this->assertFalse($this->object->has_get_datas());
$_GET = array('TOPPy'=>null);
$this->assertTrue($this->object->has_get_datas());
}
/**
* @todo Implement testHas_get_datas().
*/
public function testHas_get_datas()
{
$this->assertFalse($this->object->has_get_datas());
$_GET = array('TOPPy' => null);
$this->assertTrue($this->object->has_get_datas());
}
/**
* @todo Implement testHas_datas().
*/
public function testHas_datas()
{
$_POST = $_GET = array();
$this->assertFalse($this->object->has_datas());
$_POST = array('malal'=>true);
$this->assertTrue($this->object->has_datas());
$_GET = array('malal'=>true);
$_POST = array();
$this->assertTrue($this->object->has_datas());
$_GET = array('malal'=>true);
$_POST = array('malal'=>true);
$this->assertTrue($this->object->has_datas());
$_POST = $_GET = array();
$this->assertFalse($this->object->has_datas());
}
/**
* @todo Implement testHas_datas().
*/
public function testHas_datas()
{
$_POST = $_GET = array();
$this->assertFalse($this->object->has_datas());
$_POST = array('malal' => true);
$this->assertTrue($this->object->has_datas());
$_GET = array('malal' => true);
$_POST = array();
$this->assertTrue($this->object->has_datas());
$_GET = array('malal' => true);
$_POST = array('malal' => true);
$this->assertTrue($this->object->has_datas());
$_POST = $_GET = array();
$this->assertFalse($this->object->has_datas());
}
/**
* @todo Implement testFilter().
*/
public function testFilter()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
/**
* @todo Implement testFilter().
*/
public function testFilter()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
/**
* @todo Implement testIs_command_line().
*/
public function testIs_command_line()
{
$this->assertTrue($this->object->is_command_line());
}
);
}
/**
* @todo Implement testIs_command_line().
*/
public function testIs_command_line()
{
$this->assertTrue($this->object->is_command_line());
}
}

View File

@@ -4,166 +4,185 @@ require_once __DIR__ . '/PhraseanetPHPUnitAbstract.class.inc';
class registryTest extends PhraseanetPHPUnitAbstract
{
/**
* @var registry
*/
protected $object;
public function setUp()
{
parent::setUp();
$this->object = registry::get_instance();
}
public function testGet()
{
$this->testSet();
}
public function testSet()
{
/**
* Set value with default type (string)
* @var registry
*/
$this->object->set('key_test', 'value1', registry::TYPE_STRING);
$this->assertTrue($this->object->get('key_test') === 'value1');
protected $object;
$this->object->set('key_test', 1, registry::TYPE_STRING);
$this->assertTrue($this->object->get('key_test') === '1');
public function setUp()
{
parent::setUp();
$this->object = registry::get_instance();
}
$this->object->set('key_test', '1', registry::TYPE_STRING);
$this->assertTrue($this->object->get('key_test') === '1');
public function testGet()
{
$this->testSet();
}
$this->object->set('key_test', array('caca'), registry::TYPE_STRING);
$this->assertTrue($this->object->get('key_test') === 'Array');
public function testSet()
{
/**
* Set value with default type (string)
*/
$this->object->set('key_test', 'value1', registry::TYPE_STRING);
$this->assertTrue($this->object->get('key_test') === 'value1');
$this->object->set('key_test', 1, registry::TYPE_STRING);
$this->assertTrue($this->object->get('key_test') === '1');
/**
* Set value with type (string)
*/
$this->object->set('key_test', 'value1', registry::TYPE_STRING);
$this->assertTrue($this->object->get('key_test') === 'value1');
$this->object->set('key_test', '1', registry::TYPE_STRING);
$this->assertTrue($this->object->get('key_test') === '1');
$this->object->set('key_test', 1, registry::TYPE_STRING);
$this->assertTrue($this->object->get('key_test') === '1');
/**
* Set value with type (string)
*/
$this->object->set('key_test', 'value1', registry::TYPE_STRING);
$this->assertTrue($this->object->get('key_test') === 'value1');
$this->object->set('key_test', '1', registry::TYPE_STRING);
$this->assertTrue($this->object->get('key_test') === '1');
$this->object->set('key_test', 1, registry::TYPE_STRING);
$this->assertTrue($this->object->get('key_test') === '1');
$this->object->set('key_test', array('caca'), registry::TYPE_STRING);
$this->assertTrue($this->object->get('key_test') === 'Array');
$this->object->set('key_test', '1', registry::TYPE_STRING);
$this->assertTrue($this->object->get('key_test') === '1');
/**
* Set value with type (int)
*/
$this->object->set('key_test', 'value1', registry::TYPE_INTEGER);
$this->assertTrue($this->object->get('key_test') === 0);
/**
* Set value with type (int)
*/
$this->object->set('key_test', 'value1', registry::TYPE_INTEGER);
$this->assertTrue($this->object->get('key_test') === 0);
$this->object->set('key_test', 1, registry::TYPE_INTEGER);
$this->assertTrue($this->object->get('key_test') === 1);
$this->object->set('key_test', 1, registry::TYPE_INTEGER);
$this->assertTrue($this->object->get('key_test') === 1);
$this->object->set('key_test', '1', registry::TYPE_INTEGER);
$this->assertTrue($this->object->get('key_test') === 1);
$this->object->set('key_test', '1', registry::TYPE_INTEGER);
$this->assertTrue($this->object->get('key_test') === 1);
$this->object->set('key_test', array('caca'), registry::TYPE_INTEGER);
$this->assertTrue($this->object->get('key_test') === 1);
$this->object->set('key_test', array('caca'), registry::TYPE_INTEGER);
$this->assertTrue($this->object->get('key_test') === 1);
/**
* Set value with type boolean
*/
$this->object->set('key_test', 'value1', registry::TYPE_BOOLEAN);
$this->assertTrue($this->object->get('key_test') === true);
/**
* Set value with type boolean
*/
$this->object->set('key_test', 'value1', registry::TYPE_BOOLEAN);
$this->assertTrue($this->object->get('key_test') === true);
$this->object->set('key_test', 1, registry::TYPE_BOOLEAN);
$this->assertTrue($this->object->get('key_test') === true);
$this->object->set('key_test', 1, registry::TYPE_BOOLEAN);
$this->assertTrue($this->object->get('key_test') === true);
$this->object->set('key_test', '1', registry::TYPE_BOOLEAN);
$this->assertTrue($this->object->get('key_test') === true);
$this->object->set('key_test', '1', registry::TYPE_BOOLEAN);
$this->assertTrue($this->object->get('key_test') === true);
$this->object->set('key_test', array('caca'), registry::TYPE_BOOLEAN);
$this->assertTrue($this->object->get('key_test') === true);
$this->object->set('key_test', array('caca'), registry::TYPE_BOOLEAN);
$this->assertTrue($this->object->get('key_test') === true);
$this->object->set('key_test', '0', registry::TYPE_BOOLEAN);
$this->assertTrue($this->object->get('key_test') === false);
$this->object->set('key_test', '0', registry::TYPE_BOOLEAN);
$this->assertTrue($this->object->get('key_test') === false);
$this->object->set('key_test', 0, registry::TYPE_BOOLEAN);
$this->assertTrue($this->object->get('key_test') === false);
$this->object->set('key_test', 0, registry::TYPE_BOOLEAN);
$this->assertTrue($this->object->get('key_test') === false);
$this->object->set('key_test', false, registry::TYPE_BOOLEAN);
$this->assertTrue($this->object->get('key_test') === false);
$this->object->set('key_test', false, registry::TYPE_BOOLEAN);
$this->assertTrue($this->object->get('key_test') === false);
$this->object->set('key_test', true, registry::TYPE_BOOLEAN);
$this->assertTrue($this->object->get('key_test') === true);
$this->object->set('key_test', true, registry::TYPE_BOOLEAN);
$this->assertTrue($this->object->get('key_test') === true);
/**
* Set value with type array
*/
$this->object->set('key_test', 'value1', registry::TYPE_ARRAY);
$this->assertTrue($this->object->get('key_test') === array('value1'));
/**
* Set value with type array
*/
$this->object->set('key_test', 'value1', registry::TYPE_ARRAY);
$this->assertTrue($this->object->get('key_test') === array('value1'));
$this->object->set('key_test', 1, registry::TYPE_ARRAY);
$this->assertTrue($this->object->get('key_test') === array(1));
$this->object->set('key_test', 1, registry::TYPE_ARRAY);
$this->assertTrue($this->object->get('key_test') === array(1));
$this->object->set('key_test', '1', registry::TYPE_ARRAY);
$this->assertTrue($this->object->get('key_test') === array('1'));
$this->object->set('key_test', '1', registry::TYPE_ARRAY);
$this->assertTrue($this->object->get('key_test') === array('1'));
$this->object->set('key_test', array('caca'), registry::TYPE_ARRAY);
$this->assertTrue($this->object->get('key_test') === array('caca'));
$this->object->set('key_test', array('caca'), registry::TYPE_ARRAY);
$this->assertTrue($this->object->get('key_test') === array('caca'));
$this->object->set('key_test', '0', registry::TYPE_ARRAY);
$this->assertTrue($this->object->get('key_test') === array('0'));
$this->object->set('key_test', '0', registry::TYPE_ARRAY);
$this->assertTrue($this->object->get('key_test') === array('0'));
$this->object->set('key_test', 0, registry::TYPE_ARRAY);
$this->assertTrue($this->object->get('key_test') === array(0));
$this->object->set('key_test', 0, registry::TYPE_ARRAY);
$this->assertTrue($this->object->get('key_test') === array(0));
$this->object->set('key_test', false, registry::TYPE_ARRAY);
$this->assertTrue($this->object->get('key_test') === array(false));
$this->object->set('key_test', false, registry::TYPE_ARRAY);
$this->assertTrue($this->object->get('key_test') === array(false));
$this->object->set('key_test', true, registry::TYPE_ARRAY);
$this->assertTrue($this->object->get('key_test') === array(true));
$this->object->set('key_test', true, registry::TYPE_ARRAY);
$this->assertTrue($this->object->get('key_test') === array(true));
/**
* Set value with type enum_multi
*/
$this->object->set('key_test', 'value1', registry::TYPE_ENUM_MULTI);
$this->assertTrue($this->object->get('key_test') === array('value1'));
/**
* Set value with type enum_multi
*/
$this->object->set('key_test', 'value1', registry::TYPE_ENUM_MULTI);
$this->assertTrue($this->object->get('key_test') === array('value1'));
$this->object->set('key_test', 1, registry::TYPE_ENUM_MULTI);
$this->assertTrue($this->object->get('key_test') === array(1));
$this->object->set('key_test', 1, registry::TYPE_ENUM_MULTI);
$this->assertTrue($this->object->get('key_test') === array(1));
$this->object->set('key_test', '1', registry::TYPE_ENUM_MULTI);
$this->assertTrue($this->object->get('key_test') === array('1'));
$this->object->set('key_test', '1', registry::TYPE_ENUM_MULTI);
$this->assertTrue($this->object->get('key_test') === array('1'));
$this->object->set('key_test', array('caca'), registry::TYPE_ENUM_MULTI);
$this->assertTrue($this->object->get('key_test') === array('caca'));
$this->object->set('key_test', array('caca'), registry::TYPE_ENUM_MULTI);
$this->assertTrue($this->object->get('key_test') === array('caca'));
$this->object->set('key_test', '0', registry::TYPE_ENUM_MULTI);
$this->assertTrue($this->object->get('key_test') === array('0'));
$this->object->set('key_test', '0', registry::TYPE_ENUM_MULTI);
$this->assertTrue($this->object->get('key_test') === array('0'));
$this->object->set('key_test', 0, registry::TYPE_ENUM_MULTI);
$this->assertTrue($this->object->get('key_test') === array(0));
$this->object->set('key_test', 0, registry::TYPE_ENUM_MULTI);
$this->assertTrue($this->object->get('key_test') === array(0));
$this->object->set('key_test', false, registry::TYPE_ENUM_MULTI);
$this->assertTrue($this->object->get('key_test') === array(false));
$this->object->set('key_test', false, registry::TYPE_ENUM_MULTI);
$this->assertTrue($this->object->get('key_test') === array(false));
$this->object->set('key_test', true, registry::TYPE_ENUM_MULTI);
$this->assertTrue($this->object->get('key_test') === array(true));
}
$this->object->set('key_test', true, registry::TYPE_ENUM_MULTI);
$this->assertTrue($this->object->get('key_test') === array(true));
}
public function testIs_set()
{
$this->object->set('key_test', 'value', registry::TYPE_STRING);
$this->assertTrue($this->object->is_set('key_test'));
$this->assertFalse($this->object->is_set('keifgjkqskodfqsflqkspfoqsfp'));
}
public function testSetArrayToString()
{
try {
$this->object->set('key_test', array('caca'), registry::TYPE_STRING);
public function testUn_set()
{
$this->testIs_set();
$this->object->un_set('key_test');
$this->assertFalse($this->object->is_set('key_test'));
}
if (version_compare(PHP_VERSION, '5.4', '>=')) {
$this->fail('Should raise an error notice');
}
$this->assertTrue($this->object->get('key_test') === 'Array');
} catch (\PHPUnit_Framework_Error_Notice $e) {
}
try {
$this->object->set('key_test', array('caca'), registry::TYPE_STRING);
if (version_compare(PHP_VERSION, '5.4', '>=')) {
$this->fail('Should raise an error notice');
}
$this->assertTrue($this->object->get('key_test') === 'Array');
} catch (\PHPUnit_Framework_Error_Notice $e) {
}
}
public function testIs_set()
{
$this->object->set('key_test', 'value', registry::TYPE_STRING);
$this->assertTrue($this->object->is_set('key_test'));
$this->assertFalse($this->object->is_set('keifgjkqskodfqsflqkspfoqsfp'));
}
public function testUn_set()
{
$this->testIs_set();
$this->object->un_set('key_test');
$this->assertFalse($this->object->is_set('key_test'));
}
}

View File

@@ -29,7 +29,7 @@ class connexionReportTest extends PhraseanetPHPUnitAbstract
public function setUp()
{
$date = new Datetime();
$thid->dmax = $date->format("Y-m-d H:i:s");
$this->dmax = $date->format("Y-m-d H:i:s");
$date->modify('-6 month');
$this->dmin = $date->format("Y-m-d H:i:s");
$appbox = appbox::get_instance(\bootstrap::getCore());

View File

@@ -28,7 +28,7 @@ class downloadReportTest extends PhraseanetPHPUnitAbstract
public function setUp()
{
$date = new Datetime();
$thid->dmax = $date->format("Y-m-d H:i:s");
$this->dmax = $date->format("Y-m-d H:i:s");
$date->modify('-6 month');
$this->dmin = $date->format("Y-m-d H:i:s");
$appbox = appbox::get_instance(\bootstrap::getCore());

View File

@@ -28,7 +28,7 @@ class filterTest extends PhraseanetPHPUnitAbstract
public function setup()
{
$date = new Datetime();
$thid->dmax = $date->format("Y-m-d H:i:s");
$this->dmax = $date->format("Y-m-d H:i:s");
$date->modify('-6 month');
$this->dmin = $date->format("Y-m-d H:i:s");
$appbox = appbox::get_instance(\bootstrap::getCore());

View File

@@ -28,7 +28,7 @@ class questionReportTest extends PhraseanetPHPUnitAbstract
public function setUp()
{
$date = new Datetime();
$thid->dmax = $date->format("Y-m-d H:i:s");
$this->dmax = $date->format("Y-m-d H:i:s");
$date->modify('-6 month');
$this->dmin = $date->format("Y-m-d H:i:s");
$appbox = appbox::get_instance(\bootstrap::getCore());

View File

@@ -41,7 +41,7 @@ class reportTest extends PhraseanetPHPUnitAbstract
</description>
</record>';
$date = new Datetime();
$thid->dmax = $date->format("Y-m-d H:i:s");
$this->dmax = $date->format("Y-m-d H:i:s");
$date->modify('-6 month');
$this->dmin = $date->format("Y-m-d H:i:s");
$appbox = appbox::get_instance(\bootstrap::getCore());