Skip to content

Instantly share code, notes, and snippets.

@osteel
Last active May 20, 2022 13:59
Show Gist options
  • Save osteel/848328f795dc5426fc0143075da74945 to your computer and use it in GitHub Desktop.
Save osteel/848328f795dc5426fc0143075da74945 to your computer and use it in GitHub Desktop.
<?php
namespace Osteel\PhpCliDemo\Tests\Commands;
use Osteel\PhpCliDemo\Commands\Play;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Tester\CommandTester;
class PlayTest extends TestCase
{
public function testItDoesNotCrash()
{
$command = new Play();
$tester = new CommandTester($command);
$tester->setInputs([10, 'yes', 10, 'no']);
$tester->execute([]);
$tester->assertCommandIsSuccessful();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment