ThrowingTest.php 395 B

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