mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-19 07:53:14 +00:00
Fix Typos
This commit is contained in:
@@ -213,7 +213,7 @@ class ControllerRssFeedTest extends \PhraseanetWebTestCaseAbstract
|
|||||||
protected function evaluateAtom(Response $response)
|
protected function evaluateAtom(Response $response)
|
||||||
{
|
{
|
||||||
$dom_doc = new DOMDocument();
|
$dom_doc = new DOMDocument();
|
||||||
$doc->preserveWhiteSpace = false;
|
$dom_doc->preserveWhiteSpace = false;
|
||||||
$dom_doc->loadXML($response->getContent());
|
$dom_doc->loadXML($response->getContent());
|
||||||
|
|
||||||
$xpath = new DOMXPath($dom_doc);
|
$xpath = new DOMXPath($dom_doc);
|
||||||
|
@@ -19,7 +19,7 @@ class Feed_XML_RSS_ImageTest extends PhraseanetPHPUnitAbstract
|
|||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->this->link = 'http://www.example.org';
|
$this->link = 'http://www.example.org';
|
||||||
$this->title = 'Un beau titre';
|
$this->title = 'Un beau titre';
|
||||||
$this->url = 'http://www.example.org/image.jpg';
|
$this->url = 'http://www.example.org/image.jpg';
|
||||||
$this->width = 42;
|
$this->width = 42;
|
||||||
|
@@ -4,7 +4,6 @@ require_once __DIR__ . '/../PhraseanetPHPUnitAbstract.class.inc';
|
|||||||
|
|
||||||
class http_requestTest extends PHPUnit_Framework_TestCase
|
class http_requestTest extends PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var http_request
|
* @var http_request
|
||||||
*/
|
*/
|
||||||
@@ -101,7 +100,9 @@ class http_requestTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$_GET = array('lili' => '25', 'popo' => array('tip', 'top'));
|
$_GET = array('lili' => '25', 'popo' => array('tip', 'top'));
|
||||||
$_POST = array('Plili' => '25', 'Gpopo' => array('mtip', 'btop'));
|
$_POST = array('Plili' => '25', 'Gpopo' => array('mtip', 'btop'));
|
||||||
|
|
||||||
$parm = $this->object->get_parms('lili', 'Plili', 'popo', 'Gpopo', 'notexists');
|
$parm = $this->object->get_parms('lili', 'Plili', 'popo', 'Gpopo', 'notexists');
|
||||||
|
|
||||||
$this->assertEquals($_GET['lili'], $parm['lili']);
|
$this->assertEquals($_GET['lili'], $parm['lili']);
|
||||||
$this->assertEquals($_POST['Plili'], $parm['Plili']);
|
$this->assertEquals($_POST['Plili'], $parm['Plili']);
|
||||||
$this->assertEquals($_GET['popo'], $parm['popo']);
|
$this->assertEquals($_GET['popo'], $parm['popo']);
|
||||||
@@ -113,7 +114,6 @@ class http_requestTest extends PHPUnit_Framework_TestCase
|
|||||||
'lili' => http_request::SANITIZE_NUMBER_INT
|
'lili' => http_request::SANITIZE_NUMBER_INT
|
||||||
, 'Plili'
|
, 'Plili'
|
||||||
, 'popo'
|
, 'popo'
|
||||||
, 'Gpopo' => http_request::SANITIZE_STRING
|
|
||||||
, 'notexists' => http_request::SANITIZE_STRING
|
, 'notexists' => http_request::SANITIZE_STRING
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@@ -122,12 +122,27 @@ class http_requestTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue(is_int($parm['lili']));
|
$this->assertTrue(is_int($parm['lili']));
|
||||||
$this->assertEquals($_POST['Plili'], $parm['Plili']);
|
$this->assertEquals($_POST['Plili'], $parm['Plili']);
|
||||||
$this->assertEquals($_GET['popo'], $parm['popo']);
|
$this->assertEquals($_GET['popo'], $parm['popo']);
|
||||||
$this->assertEquals('Array', $parm['Gpopo']);
|
|
||||||
$this->assertEquals('', $parm['notexists']);
|
$this->assertEquals('', $parm['notexists']);
|
||||||
|
|
||||||
$_GET = $_POST = array();
|
$_GET = $_POST = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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().
|
* @todo Implement testGet_parms_from_serialized_datas().
|
||||||
*/
|
*/
|
||||||
@@ -205,5 +220,4 @@ class http_requestTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$this->assertTrue($this->object->is_command_line());
|
$this->assertTrue($this->object->is_command_line());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -4,7 +4,6 @@ require_once __DIR__ . '/PhraseanetPHPUnitAbstract.class.inc';
|
|||||||
|
|
||||||
class registryTest extends PhraseanetPHPUnitAbstract
|
class registryTest extends PhraseanetPHPUnitAbstract
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var registry
|
* @var registry
|
||||||
*/
|
*/
|
||||||
@@ -35,10 +34,6 @@ class registryTest extends PhraseanetPHPUnitAbstract
|
|||||||
$this->object->set('key_test', '1', registry::TYPE_STRING);
|
$this->object->set('key_test', '1', registry::TYPE_STRING);
|
||||||
$this->assertTrue($this->object->get('key_test') === '1');
|
$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');
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set value with type (string)
|
* Set value with type (string)
|
||||||
*/
|
*/
|
||||||
@@ -51,9 +46,6 @@ class registryTest extends PhraseanetPHPUnitAbstract
|
|||||||
$this->object->set('key_test', '1', registry::TYPE_STRING);
|
$this->object->set('key_test', '1', registry::TYPE_STRING);
|
||||||
$this->assertTrue($this->object->get('key_test') === '1');
|
$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');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set value with type (int)
|
* Set value with type (int)
|
||||||
*/
|
*/
|
||||||
@@ -151,6 +143,34 @@ class registryTest extends PhraseanetPHPUnitAbstract
|
|||||||
$this->assertTrue($this->object->get('key_test') === array(true));
|
$this->assertTrue($this->object->get('key_test') === array(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testSetArrayToString()
|
||||||
|
{
|
||||||
|
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) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
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()
|
public function testIs_set()
|
||||||
{
|
{
|
||||||
$this->object->set('key_test', 'value', registry::TYPE_STRING);
|
$this->object->set('key_test', 'value', registry::TYPE_STRING);
|
||||||
@@ -164,6 +184,5 @@ class registryTest extends PhraseanetPHPUnitAbstract
|
|||||||
$this->object->un_set('key_test');
|
$this->object->un_set('key_test');
|
||||||
$this->assertFalse($this->object->is_set('key_test'));
|
$this->assertFalse($this->object->is_set('key_test'));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -29,7 +29,7 @@ class connexionReportTest extends PhraseanetPHPUnitAbstract
|
|||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
$date = new Datetime();
|
$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');
|
$date->modify('-6 month');
|
||||||
$this->dmin = $date->format("Y-m-d H:i:s");
|
$this->dmin = $date->format("Y-m-d H:i:s");
|
||||||
$appbox = appbox::get_instance(\bootstrap::getCore());
|
$appbox = appbox::get_instance(\bootstrap::getCore());
|
||||||
|
@@ -28,7 +28,7 @@ class downloadReportTest extends PhraseanetPHPUnitAbstract
|
|||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
$date = new Datetime();
|
$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');
|
$date->modify('-6 month');
|
||||||
$this->dmin = $date->format("Y-m-d H:i:s");
|
$this->dmin = $date->format("Y-m-d H:i:s");
|
||||||
$appbox = appbox::get_instance(\bootstrap::getCore());
|
$appbox = appbox::get_instance(\bootstrap::getCore());
|
||||||
|
@@ -28,7 +28,7 @@ class filterTest extends PhraseanetPHPUnitAbstract
|
|||||||
public function setup()
|
public function setup()
|
||||||
{
|
{
|
||||||
$date = new Datetime();
|
$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');
|
$date->modify('-6 month');
|
||||||
$this->dmin = $date->format("Y-m-d H:i:s");
|
$this->dmin = $date->format("Y-m-d H:i:s");
|
||||||
$appbox = appbox::get_instance(\bootstrap::getCore());
|
$appbox = appbox::get_instance(\bootstrap::getCore());
|
||||||
|
@@ -28,7 +28,7 @@ class questionReportTest extends PhraseanetPHPUnitAbstract
|
|||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
$date = new Datetime();
|
$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');
|
$date->modify('-6 month');
|
||||||
$this->dmin = $date->format("Y-m-d H:i:s");
|
$this->dmin = $date->format("Y-m-d H:i:s");
|
||||||
$appbox = appbox::get_instance(\bootstrap::getCore());
|
$appbox = appbox::get_instance(\bootstrap::getCore());
|
||||||
|
@@ -41,7 +41,7 @@ class reportTest extends PhraseanetPHPUnitAbstract
|
|||||||
</description>
|
</description>
|
||||||
</record>';
|
</record>';
|
||||||
$date = new Datetime();
|
$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');
|
$date->modify('-6 month');
|
||||||
$this->dmin = $date->format("Y-m-d H:i:s");
|
$this->dmin = $date->format("Y-m-d H:i:s");
|
||||||
$appbox = appbox::get_instance(\bootstrap::getCore());
|
$appbox = appbox::get_instance(\bootstrap::getCore());
|
||||||
|
Reference in New Issue
Block a user