Added image processing actgion and loop

This commit is contained in:
franck
2013-08-15 11:44:46 +02:00
parent bceb65dad6
commit 47bc545019
14 changed files with 66 additions and 52 deletions

View File

@@ -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()