ExitCommandTest.php 685 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /*
  3. * This file is part of Psy Shell.
  4. *
  5. * (c) 2012-2018 Justin Hileman
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Console\Tests\Command;
  11. use Psy\Command\ExitCommand;
  12. use Symfony\Component\Console\Tester\CommandTester;
  13. class ExitCommandTest extends \PHPUnit\Framework\TestCase
  14. {
  15. /**
  16. * @expectedException \Psy\Exception\BreakException
  17. * @expectedExceptionMessage Goodbye
  18. */
  19. public function testExecute()
  20. {
  21. $command = new ExitCommand();
  22. $tester = new CommandTester($command);
  23. $tester->execute([]);
  24. }
  25. }