Fix CS in unit tests + remove unused unit tests

This commit is contained in:
Romain Neutron
2012-05-10 17:08:01 +02:00
parent 21c2d15754
commit 17cd58f5e1
224 changed files with 16423 additions and 22543 deletions

View File

@@ -4,23 +4,23 @@ require_once __DIR__ . '/../../PhraseanetWebTestCaseAuthenticatedAbstract.class.
use Symfony\Component\Console\Tester\CommandTester;
use \Symfony\Component\Console\Application;
class module_console_systemTemplateGeneratorTest extends PHPUnit_Framework_TestCase
{
public function testExecute()
{
// mock the Kernel or create one depending on your needs
$application = new Application();
$application->add(new module_console_systemTemplateGenerator('system:templateGenerator'));
$command = $application->find('system:templateGenerator');
$commandTester = new CommandTester($command);
$commandTester->execute(array('command' => $command->getName()));
public function testExecute()
{
// mock the Kernel or create one depending on your needs
$application = new Application();
$application->add(new module_console_systemTemplateGenerator('system:templateGenerator'));
$last_line = array_pop(explode("\n", trim($commandTester->getDisplay())));
$this->assertTrue(strpos($last_line, 'templates failed') === false, 'Some templates failed');
$this->assertTrue(strpos($last_line, 'templates generated') !== true, 'Some templates have been generated');
}
$command = $application->find('system:templateGenerator');
$commandTester = new CommandTester($command);
$commandTester->execute(array('command' => $command->getName()));
$last_line = array_pop(explode("\n", trim($commandTester->getDisplay())));
$this->assertTrue(strpos($last_line, 'templates failed') === false, 'Some templates failed');
$this->assertTrue(strpos($last_line, 'templates generated') !== true, 'Some templates have been generated');
}
}