mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 12:03:14 +00:00
31 lines
847 B
PHP
31 lines
847 B
PHP
<?php
|
|
|
|
use Alchemy\Phrasea\CLI;
|
|
use Symfony\Component\Console\Tester\CommandTester;
|
|
|
|
class module_console_aboutAuthorsTest extends PHPUnit_Framework_TestCase
|
|
{
|
|
/**
|
|
* @var module_console_aboutAuthors
|
|
*/
|
|
protected $object;
|
|
|
|
/**
|
|
* @covers module_console_aboutAuthors::execute
|
|
*/
|
|
public function testExecute()
|
|
{
|
|
$application = new CLI('test', null, 'test');
|
|
$application->command(new module_console_aboutAuthors('about:authors'));
|
|
|
|
$command = $application['console']->find('about:authors');
|
|
$commandTester = new CommandTester($command);
|
|
$commandTester->execute(array('command' => $command->getName()));
|
|
|
|
$this->assertEquals(
|
|
trim(file_get_contents(__DIR__ . '/../../../../AUTHORS'))
|
|
, trim($commandTester->getDisplay())
|
|
);
|
|
}
|
|
}
|