Use composer as application autoloader

This commit is contained in:
Romain Neutron
2013-01-18 17:47:25 +01:00
parent 358cdddcc6
commit 2069d40544
784 changed files with 1031 additions and 1806 deletions

View File

@@ -0,0 +1,30 @@
<?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())
);
}
}