DrupalListener.php

Same filename in this branch
  1. 8.9.x core/tests/Drupal/TestTools/PhpUnitCompatibility/PhpUnit6/DrupalListener.php
  2. 8.9.x core/tests/Drupal/TestTools/PhpUnitCompatibility/PhpUnit7/DrupalListener.php
Same filename in other branches
  1. 9 core/tests/Drupal/Tests/Listeners/DrupalListener.php
  2. 10 core/tests/Drupal/Tests/Listeners/DrupalListener.php
  3. 11.x core/tests/Drupal/Tests/Listeners/DrupalListener.php

Listens to PHPUnit test runs.

In order to manage different method signatures between PHPUnit versions, we dynamically load a class dependent on the PHPUnit runner version.

Namespace

Drupal\Tests\Listeners

File

core/tests/Drupal/Tests/Listeners/DrupalListener.php

View source
<?php


/**
 * @file
 * Listens to PHPUnit test runs.
 *
 * In order to manage different method signatures between PHPUnit versions, we
 * dynamically load a class dependent on the PHPUnit runner version.
 */
namespace Drupal\Tests\Listeners;

use Drupal\TestTools\PhpUnitCompatibility\RunnerVersion;
class_alias("Drupal\\TestTools\\PhpUnitCompatibility\\PhpUnit" . RunnerVersion::getMajor() . "\\DrupalListener", DrupalListener::class);

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