ThrowingTest.php 388 B

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