Sen descrición

RuntimeExceptionTest.php 766B

12345678910111213141516171819202122232425262728293031
  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 Psy\Test\Exception;
  11. use Psy\Exception\RuntimeException;
  12. class RuntimeExceptionTest extends \PHPUnit\Framework\TestCase
  13. {
  14. public function testException()
  15. {
  16. $msg = 'bananas';
  17. $e = new RuntimeException($msg);
  18. $this->assertInstanceOf('Psy\Exception\Exception', $e);
  19. $this->assertInstanceOf('RuntimeException', $e);
  20. $this->assertInstanceOf('Psy\Exception\RuntimeException', $e);
  21. $this->assertSame($msg, $e->getMessage());
  22. $this->assertSame($msg, $e->getRawMessage());
  23. }
  24. }