You are here

PhpUnitBridgeIsolatedTest.php in Drupal 8

Same filename and directory in other branches
  1. 9 core/tests/Drupal/Tests/Core/Test/PhpUnitBridgeIsolatedTest.php

File

core/tests/Drupal/Tests/Core/Test/PhpUnitBridgeIsolatedTest.php
View source
<?php

namespace Drupal\Tests\Core\Test;

use Drupal\Tests\UnitTestCase;
use Drupal\deprecation_test\Deprecation\FixtureDeprecatedClass;

/**
 * Test how unit tests interact with deprecation errors in process isolation.
 *
 * @runTestsInSeparateProcesses
 * @preserveGlobalState disabled
 *
 * @group Test
 * @group legacy
 */
class PhpUnitBridgeIsolatedTest extends UnitTestCase {

  /**
   * @expectedDeprecation Drupal\deprecation_test\Deprecation\FixtureDeprecatedClass is deprecated.
   */
  public function testDeprecatedClass() {
    $deprecated = new FixtureDeprecatedClass();
    $this
      ->assertEquals('test', $deprecated
      ->testFunction());
  }

}

Classes

Namesort descending Description
PhpUnitBridgeIsolatedTest Test how unit tests interact with deprecation errors in process isolation.