mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
Update tests
This commit is contained in:
@@ -23,7 +23,7 @@ class CommandTest extends \PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testCheckSetup()
|
public function testCheckSetup()
|
||||||
{
|
{
|
||||||
$this->object->setContainer(new Application('test'));
|
$this->object->setContainer(self::$application);
|
||||||
$this->object->checkSetup();
|
$this->object->checkSetup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -40,7 +40,7 @@ class UpgradeDBDatasTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertEquals(array(), $this->object->getUpgrades());
|
$this->assertEquals(array(), $this->object->getUpgrades());
|
||||||
|
|
||||||
$upgrades = array(
|
$upgrades = array(
|
||||||
new Step31(new Application('test'))
|
new Step31(self::$application)
|
||||||
);
|
);
|
||||||
$this->object->setUpgrades($upgrades);
|
$this->object->setUpgrades($upgrades);
|
||||||
$this->assertEquals($upgrades, $this->object->getUpgrades());
|
$this->assertEquals($upgrades, $this->object->getUpgrades());
|
||||||
@@ -53,12 +53,12 @@ class UpgradeDBDatasTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$this->assertEquals(array(), $this->object->getUpgrades());
|
$this->assertEquals(array(), $this->object->getUpgrades());
|
||||||
|
|
||||||
$step31 = new Step31(new Application('test'));
|
$step31 = new Step31(self::$application);
|
||||||
$this->object->addUpgrade($step31);
|
$this->object->addUpgrade($step31);
|
||||||
|
|
||||||
$this->assertEquals(array($step31), $this->object->getUpgrades());
|
$this->assertEquals(array($step31), $this->object->getUpgrades());
|
||||||
|
|
||||||
$step35 = new Step35(new Application('test'));
|
$step35 = new Step35(self::$application);
|
||||||
$this->object->addUpgrade($step35);
|
$this->object->addUpgrade($step35);
|
||||||
|
|
||||||
$this->assertEquals(array($step31, $step35), $this->object->getUpgrades());
|
$this->assertEquals(array($step31, $step35), $this->object->getUpgrades());
|
||||||
|
@@ -156,7 +156,7 @@ class BorderManagerTest extends \PhraseanetPHPUnitAbstract
|
|||||||
|
|
||||||
public function getDataboxAndCollection()
|
public function getDataboxAndCollection()
|
||||||
{
|
{
|
||||||
$app = new Application('test');
|
$app = self::$application;
|
||||||
$databox = $collection = null;
|
$databox = $collection = null;
|
||||||
$appbox = $app['phraseanet.appbox'];
|
$appbox = $app['phraseanet.appbox'];
|
||||||
|
|
||||||
|
@@ -16,7 +16,7 @@ class CacheBuilderTest extends PhraseanetPHPUnitAbstract
|
|||||||
);
|
);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$service = Builder::create(new Application('test'), $configuration);
|
$service = Builder::create(self::$application, $configuration);
|
||||||
$this->fail("An exception should be raised");
|
$this->fail("An exception should be raised");
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ class CacheBuilderTest extends PhraseanetPHPUnitAbstract
|
|||||||
array("type" => "Cache\\ArrayCache")
|
array("type" => "Cache\\ArrayCache")
|
||||||
);
|
);
|
||||||
|
|
||||||
$service = Builder::create(new Application('test'), $configuration);
|
$service = Builder::create(self::$application, $configuration);
|
||||||
$this->assertInstanceOf("\Alchemy\Phrasea\Core\Service\ServiceAbstract", $service);
|
$this->assertInstanceOf("\Alchemy\Phrasea\Core\Service\ServiceAbstract", $service);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,7 +16,7 @@ class LogBuilderTest extends PhraseanetPHPUnitAbstract
|
|||||||
);
|
);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$service = Builder::create(new Application('test'), $configuration);
|
$service = Builder::create(self::$application, $configuration);
|
||||||
$this->fail("An exception should be raised");
|
$this->fail("An exception should be raised");
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ class LogBuilderTest extends PhraseanetPHPUnitAbstract
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$service = Builder::create(new Application('test'), $configuration);
|
$service = Builder::create(self::$application, $configuration);
|
||||||
$this->assertInstanceOf("\Alchemy\Phrasea\Core\Service\ServiceAbstract", $service);
|
$this->assertInstanceOf("\Alchemy\Phrasea\Core\Service\ServiceAbstract", $service);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ class LogBuilderTest extends PhraseanetPHPUnitAbstract
|
|||||||
array("type" => "Log\\Doctrine\\Phpecho", "options" => array())
|
array("type" => "Log\\Doctrine\\Phpecho", "options" => array())
|
||||||
);
|
);
|
||||||
|
|
||||||
$service = Builder::create(new Application('test'), $configuration);
|
$service = Builder::create(self::$application, $configuration);
|
||||||
$this->assertInstanceOf("\Alchemy\Phrasea\Core\Service\ServiceAbstract", $service);
|
$this->assertInstanceOf("\Alchemy\Phrasea\Core\Service\ServiceAbstract", $service);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,7 +16,7 @@ class OrmBuilderTest extends PhraseanetPHPUnitAbstract
|
|||||||
);
|
);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$service = Builder::create(new Application('test'), $configuration);
|
$service = Builder::create(self::$application, $configuration);
|
||||||
$this->fail("An exception should be raised");
|
$this->fail("An exception should be raised");
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ class OrmBuilderTest extends PhraseanetPHPUnitAbstract
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$service = Builder::create(new Application('test'), $configuration);
|
$service = Builder::create(self::$application, $configuration);
|
||||||
$this->assertInstanceOf("\Alchemy\Phrasea\Core\Service\ServiceAbstract", $service);
|
$this->assertInstanceOf("\Alchemy\Phrasea\Core\Service\ServiceAbstract", $service);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user