RuntimeExceptionTest.php 778 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /*
  3. * This file is part of Psy Shell.
  4. *
  5. * (c) 2012-2017 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\Exception;
  12. use Psy\Exception\RuntimeException;
  13. class RuntimeExceptionTest extends \PHPUnit_Framework_TestCase
  14. {
  15. public function testException()
  16. {
  17. $msg = 'bananas';
  18. $e = new RuntimeException($msg);
  19. $this->assertTrue($e instanceof Exception);
  20. $this->assertTrue($e instanceof \RuntimeException);
  21. $this->assertTrue($e instanceof RuntimeException);
  22. $this->assertEquals($msg, $e->getMessage());
  23. $this->assertEquals($msg, $e->getRawMessage());
  24. }
  25. }