mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
PHRAS-2859_tests-do-corrupt-conf_4.1
fix : configuration.yml is not modified by unit-tests anymore
This commit is contained in:
@@ -15,6 +15,25 @@ use Symfony\Component\Process\ExecutableFinder;
|
||||
*/
|
||||
class AutoloaderGeneratorTest extends \PhraseanetTestCase
|
||||
{
|
||||
private $bkp = null;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
$this->bkp = self::$DI['app']['conf']->get('plugins');
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
{
|
||||
if(is_null($this->bkp)) {
|
||||
self::$DI['app']['conf']->remove('plugins');
|
||||
}
|
||||
else {
|
||||
self::$DI['app']['conf']->set('plugins', $this->bkp);
|
||||
}
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
public function testGeneratedFileAfterInstall()
|
||||
{
|
||||
$pluginDir = __DIR__ . '/../Fixtures/PluginDirInstalled/test-plugin';
|
||||
|
@@ -11,6 +11,26 @@ use Alchemy\Phrasea\Plugin\Schema\PluginValidator;
|
||||
*/
|
||||
class PluginManagerTest extends PluginTestCase
|
||||
{
|
||||
private $bkp;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
$this->bkp = self::$DI['app']['conf']->get('plugins');
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
{
|
||||
if(is_null($this->bkp)) {
|
||||
self::$DI['app']['conf']->remove('plugins');
|
||||
}
|
||||
else {
|
||||
self::$DI['app']['conf']->set('plugins', $this->bkp);
|
||||
}
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
|
||||
public function testListGoodPlugins()
|
||||
{
|
||||
$prevPlugins = self::$DI['cli']['conf']->get('plugins');
|
||||
|
Reference in New Issue
Block a user