You are here

public function UndefinedMethodFatalErrorHandlerTest::testUndefinedMethod in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php \Symfony\Component\Debug\Tests\FatalErrorHandler\UndefinedMethodFatalErrorHandlerTest::testUndefinedMethod()

@dataProvider provideUndefinedMethodData

File

vendor/symfony/debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php, line 22

Class

UndefinedMethodFatalErrorHandlerTest

Namespace

Symfony\Component\Debug\Tests\FatalErrorHandler

Code

public function testUndefinedMethod($error, $translatedMessage) {
  $handler = new UndefinedMethodFatalErrorHandler();
  $exception = $handler
    ->handleError($error, new FatalErrorException('', 0, $error['type'], $error['file'], $error['line']));
  $this
    ->assertInstanceOf('Symfony\\Component\\Debug\\Exception\\UndefinedMethodException', $exception);
  $this
    ->assertSame($translatedMessage, $exception
    ->getMessage());
  $this
    ->assertSame($error['type'], $exception
    ->getSeverity());
  $this
    ->assertSame($error['file'], $exception
    ->getFile());
  $this
    ->assertSame($error['line'], $exception
    ->getLine());
}