PsyVersionCommandTest.php 736 B

1234567891011121314151617181920212223242526272829303132
  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\PsyVersionCommand;
  12. use Psy\Shell;
  13. use Symfony\Component\Console\Tester\CommandTester;
  14. /**
  15. * @group isolation-fail
  16. */
  17. class PsyVersionCommandTest extends \Psy\Test\TestCase
  18. {
  19. public function testExecute()
  20. {
  21. $command = new PsyVersionCommand();
  22. $command->setApplication(new Shell());
  23. $tester = new CommandTester($command);
  24. $tester->execute([]);
  25. $this->assertStringContainsString(Shell::VERSION, $tester->getDisplay());
  26. }
  27. }