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