38 lines
1 KiB
PHP
38 lines
1 KiB
PHP
<?php
|
|
|
|
use pgrep\DefaultCommand;
|
|
use Symfony\Component\Console\Application;
|
|
use Symfony\Component\Console\Tester\CommandTester;
|
|
|
|
/**
|
|
* Inherited Methods
|
|
* @method void wantToTest($text)
|
|
* @method void wantTo($text)
|
|
* @method void execute($callable)
|
|
* @method void expectTo($prediction)
|
|
* @method void expect($prediction)
|
|
* @method void amGoingTo($argumentation)
|
|
* @method void am($role)
|
|
* @method void lookForwardTo($achieveValue)
|
|
* @method void comment($description)
|
|
* @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL)
|
|
*
|
|
* @SuppressWarnings(PHPMD)
|
|
*/
|
|
class UnitTester extends \Codeception\Actor
|
|
{
|
|
use _generated\UnitTesterActions;
|
|
|
|
/**
|
|
* Define custom actions here
|
|
*/
|
|
|
|
public function createTestCommand()
|
|
{
|
|
$application = new Application('echo', '1.0.0');
|
|
$command = new DefaultCommand();
|
|
$application->add($command);
|
|
$application->setDefaultCommand($command->getName(), true);
|
|
return new CommandTester($application->get('pgrep'));
|
|
}
|
|
}
|