ExitCommandTest.php 718 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /*
  3. * This file is part of Psy Shell.
  4. *
  5. * (c) 2012-2023 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 Psy\Test\Command;
  11. use Psy\Command\ExitCommand;
  12. use Symfony\Component\Console\Tester\CommandTester;
  13. /**
  14. * @group isolation-fail
  15. */
  16. class ExitCommandTest extends \Psy\Test\TestCase
  17. {
  18. public function testExecute()
  19. {
  20. $this->expectException(\Psy\Exception\BreakException::class);
  21. $this->expectExceptionMessage('Goodbye');
  22. $command = new ExitCommand();
  23. $tester = new CommandTester($command);
  24. $tester->execute([]);
  25. $this->fail();
  26. }
  27. }