You are here

public function DebugClassLoaderTest::testDeprecatedSuper in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/debug/Tests/DebugClassLoaderTest.php \Symfony\Component\Debug\Tests\DebugClassLoaderTest::testDeprecatedSuper()

@dataProvider provideDeprecatedSuper

File

vendor/symfony/debug/Tests/DebugClassLoaderTest.php, line 176

Class

DebugClassLoaderTest

Namespace

Symfony\Component\Debug\Tests

Code

public function testDeprecatedSuper($class, $super, $type) {
  set_error_handler('var_dump', 0);
  $e = error_reporting(0);
  trigger_error('', E_USER_DEPRECATED);
  class_exists('Test\\' . __NAMESPACE__ . '\\' . $class, true);
  error_reporting($e);
  restore_error_handler();
  $lastError = error_get_last();
  unset($lastError['file'], $lastError['line']);
  $xError = array(
    'type' => E_USER_DEPRECATED,
    'message' => 'The Test\\Symfony\\Component\\Debug\\Tests\\' . $class . ' class ' . $type . ' Symfony\\Component\\Debug\\Tests\\Fixtures\\' . $super . ' that is deprecated but this is a test deprecation notice.',
  );
  $this
    ->assertSame($xError, $lastError);
}