ThrowingTest.php 382 B

123456789101112131415
  1. <?php declare(strict_types=1);
  2. namespace PhpParser\ErrorHandler;
  3. use PhpParser\Error;
  4. class ThrowingTest extends \PHPUnit\Framework\TestCase
  5. {
  6. public function testHandleError() {
  7. $this->expectException(Error::class);
  8. $this->expectExceptionMessage('Test');
  9. $errorHandler = new Throwing();
  10. $errorHandler->handleError(new Error('Test'));
  11. }
  12. }