Added image processing actgion and loop
This commit is contained in:
@@ -44,24 +44,26 @@ class CacheClearTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testCacheClear()
|
||||
{
|
||||
$application = new Application($this->getKernel());
|
||||
// Fails on windows - do not execute this test on windows
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
|
||||
$application = new Application($this->getKernel());
|
||||
|
||||
$cacheClear = new CacheClear();
|
||||
$cacheClear->setContainer($this->getContainer());
|
||||
$cacheClear = new CacheClear();
|
||||
$cacheClear->setContainer($this->getContainer());
|
||||
|
||||
$application->add($cacheClear);
|
||||
$application->add($cacheClear);
|
||||
|
||||
$command = $application->find("cache:clear");
|
||||
$commandTester = new CommandTester($command);
|
||||
$commandTester->execute(array(
|
||||
"command" => $command->getName(),
|
||||
"--env" => "test"
|
||||
));
|
||||
$command = $application->find("cache:clear");
|
||||
$commandTester = new CommandTester($command);
|
||||
$commandTester->execute(array(
|
||||
"command" => $command->getName(),
|
||||
"--env" => "test"
|
||||
));
|
||||
|
||||
$fs = new Filesystem();
|
||||
|
||||
$this->assertFalse($fs->exists($this->cache_dir));
|
||||
$fs = new Filesystem();
|
||||
|
||||
$this->assertFalse($fs->exists($this->cache_dir));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -69,22 +71,28 @@ class CacheClearTest extends \PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testCacheClearWithoutWritePermission()
|
||||
{
|
||||
$fs = new Filesystem();
|
||||
$fs->chmod($this->cache_dir,0100);
|
||||
// Fails on windows - mock this test on windows
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
|
||||
$fs = new Filesystem();
|
||||
$fs->chmod($this->cache_dir,0100);
|
||||
|
||||
$application = new Application($this->getKernel());
|
||||
$application = new Application($this->getKernel());
|
||||
|
||||
$cacheClear = new CacheClear();
|
||||
$cacheClear->setContainer($this->getContainer());
|
||||
$cacheClear = new CacheClear();
|
||||
$cacheClear->setContainer($this->getContainer());
|
||||
|
||||
$application->add($cacheClear);
|
||||
$application->add($cacheClear);
|
||||
|
||||
$command = $application->find("cache:clear");
|
||||
$commandTester = new CommandTester($command);
|
||||
$commandTester->execute(array(
|
||||
"command" => $command->getName(),
|
||||
"--env" => "test"
|
||||
));
|
||||
$command = $application->find("cache:clear");
|
||||
$commandTester = new CommandTester($command);
|
||||
$commandTester->execute(array(
|
||||
"command" => $command->getName(),
|
||||
"--env" => "test"
|
||||
));
|
||||
}
|
||||
else {
|
||||
throw new \RuntimeException("");
|
||||
}
|
||||
}
|
||||
|
||||
public function getKernel()
|
||||
|
||||
Reference in New Issue
Block a user