BreakExceptionTest.php 768 B

1234567891011121314151617181920212223242526272829303132333435
  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\BreakException;
  12. use Psy\Exception\Exception;
  13. class BreakExceptionTest extends \PHPUnit_Framework_TestCase
  14. {
  15. public function testInstance()
  16. {
  17. $e = new BreakException();
  18. $this->assertTrue($e instanceof Exception);
  19. $this->assertTrue($e instanceof BreakException);
  20. }
  21. public function testMessage()
  22. {
  23. $e = new BreakException('foo');
  24. $this->assertContains('foo', $e->getMessage());
  25. $this->assertEquals('foo', $e->getRawMessage());
  26. }
  27. }