You are here

public function DebugClassLoaderTest::testUnsilencing 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::testUnsilencing()

File

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

Class

DebugClassLoaderTest

Namespace

Symfony\Component\Debug\Tests

Code

public function testUnsilencing() {
  if (PHP_VERSION_ID >= 70000) {
    $this
      ->markTestSkipped('PHP7 throws exceptions, unsilencing is not required anymore.');
  }
  if (defined('HHVM_VERSION')) {
    $this
      ->markTestSkipped('HHVM is not handled in this test case.');
  }
  ob_start();
  $this
    ->iniSet('log_errors', 0);
  $this
    ->iniSet('display_errors', 1);

  // See below: this will fail with parse error
  // but this should not be @-silenced.
  @class_exists(__NAMESPACE__ . '\\TestingUnsilencing', true);
  $output = ob_get_clean();
  $this
    ->assertStringMatchesFormat('%aParse error%a', $output);
}