mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 06:53:15 +00:00
Fix PSR-0 file naming
This commit is contained in:
24
tests/classes/module/console/systemTemplateGeneratorTest.php
Normal file
24
tests/classes/module/console/systemTemplateGeneratorTest.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
use Alchemy\Phrasea\CLI;
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
|
||||
class module_console_systemTemplateGeneratorTest extends \PhraseanetTestCase
|
||||
{
|
||||
|
||||
public function testExecute()
|
||||
{
|
||||
$application = new CLI('test', null, 'test');
|
||||
$application->command(new module_console_systemTemplateGenerator('system:templateGenerator'));
|
||||
|
||||
$command = $application['console']->find('system:templateGenerator');
|
||||
$commandTester = new CommandTester($command);
|
||||
$commandTester->execute(['command' => $command->getName()]);
|
||||
|
||||
$data = explode("\n", trim($commandTester->getDisplay()));
|
||||
$last_line = array_pop($data);
|
||||
|
||||
$this->assertTrue(strpos($last_line, 'templates failed') === false, 'Some templates failed');
|
||||
$this->assertTrue(strpos($last_line, 'templates generated') !== true, 'Some templates have been generated');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user