mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 05:23:21 +00:00
V 3.5 RC 1
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
require_once dirname(__FILE__) . '/../../PhraseanetWebTestCaseAuthenticatedAbstract.class.inc';
|
||||
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
use \Symfony\Component\Console\Application;
|
||||
|
||||
|
||||
/**
|
||||
* Test class for module_console_aboutAuthors.
|
||||
* Generated by PHPUnit on 2011-11-03 at 15:58:18.
|
||||
*/
|
||||
class module_console_aboutAuthorsTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* @var module_console_aboutAuthors
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
|
||||
/**
|
||||
* @covers module_console_aboutAuthors::execute
|
||||
*/
|
||||
public function testExecute()
|
||||
{
|
||||
// mock the Kernel or create one depending on your needs
|
||||
$application = new Application();
|
||||
$application->add(new module_console_aboutAuthors('about:authors'));
|
||||
|
||||
$command = $application->find('about:authors');
|
||||
$commandTester = new CommandTester($command);
|
||||
$commandTester->execute(array('command' => $command->getName()));
|
||||
|
||||
$this->assertEquals(
|
||||
trim(file_get_contents(dirname(__FILE__) . '/../../../../AUTHORS'))
|
||||
, trim($commandTester->getDisplay())
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user