function ClassWriter::mutateTestBase

Same name in other branches
  1. 10 core/tests/Drupal/TestTools/PhpUnitCompatibility/ClassWriter.php \Drupal\TestTools\PhpUnitCompatibility\ClassWriter::mutateTestBase()
  2. 11.x core/tests/Drupal/TestTools/PhpUnitCompatibility/ClassWriter.php \Drupal\TestTools\PhpUnitCompatibility\ClassWriter::mutateTestBase()

Mutates PHPUnit classes to make it compatible with Drupal.

Parameters

\Composer\Autoload\ClassLoader $autoloader: The autoloader.

Throws

\ReflectionException

2 calls to ClassWriter::mutateTestBase()
bootstrap.php in core/tests/bootstrap.php
Autoloader for Drupal PHPUnit testing.
TestDiscovery::registerTestNamespaces in core/lib/Drupal/Core/Test/TestDiscovery.php
Registers test namespaces of all extensions and core test classes.

File

core/tests/Drupal/TestTools/PhpUnitCompatibility/PhpUnit8/ClassWriter.php, line 33

Class

ClassWriter
Helper class to rewrite PHPUnit's TestCase class.

Namespace

Drupal\TestTools\PhpUnitCompatibility\PhpUnit8

Code

public static function mutateTestBase($autoloader) {
    static::alterAssert($autoloader);
    static::alterTestCase($autoloader);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.