for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of CaptainHook
*
* (c) Sebastian Feldmann <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CaptainHook\App\Console;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\NullOutput;
class ApplicationTest extends TestCase
{
* Tests Cli::run
* @throws \Exception
public function testVersionOutput(): void
$input = new ArrayInput(['--version' => true]);
$output = $this->getMockBuilder(NullOutput::class)
->disableOriginalConstructor()
->getMock();
$output->expects($this->once())->method('writeLn');
$app = new Application('captainhook');
$app->setAutoExit(false);
$app->run($input, $output);
}
public function testExecuteList(): void
$input = new ArrayInput(['command' => 'list']);
$output->expects($this->atLeastOnce())->method('write');