class DrupalListener
Listens to PHPUnit test runs.
@internal
Hierarchy
- class \Drupal\TestTools\PhpUnitCompatibility\PhpUnit7\DrupalListener implements \PHPUnit\Framework\TestListener uses \PHPUnit\Framework\TestListenerDefaultImplementation, \Drupal\Tests\Listeners\DeprecationListenerTrait, \Drupal\Tests\Listeners\DrupalComponentTestListenerTrait, \Drupal\Tests\Listeners\DrupalStandardsListenerTrait
Expanded class hierarchy of DrupalListener
File
-
core/
tests/ Drupal/ TestTools/ PhpUnitCompatibility/ PhpUnit7/ DrupalListener.php, line 17
Namespace
Drupal\TestTools\PhpUnitCompatibility\PhpUnit7View source
class DrupalListener implements TestListener {
use TestListenerDefaultImplementation;
use DeprecationListenerTrait;
use DrupalComponentTestListenerTrait;
use DrupalStandardsListenerTrait;
/**
* {@inheritdoc}
*/
public function startTest(Test $test) : void {
$this->deprecationStartTest($test);
}
/**
* {@inheritdoc}
*/
public function endTest(Test $test, float $time) : void {
$this->deprecationEndTest($test, $time);
$this->componentEndTest($test, $time);
$this->standardsEndTest($test, $time);
}
}
Members
| Title Sort descending | Deprecated | Modifiers | Object type | Summary |
|---|---|---|---|---|
| DeprecationListenerTrait::$previousHandler | private | property | The previous error handler. | |
| DeprecationListenerTrait::deprecationEndTest | protected | function | Reacts to the end of a test. | |
| DeprecationListenerTrait::deprecationStartTest | protected | function | ||
| DeprecationListenerTrait::getSkippedDeprecations | public static | function | A list of deprecations to ignore whilst fixes are put in place. | |
| DeprecationListenerTrait::registerErrorHandler | protected | function | Registers an error handler that wraps Symfony's DeprecationErrorHandler. | |
| DeprecationListenerTrait::willBeIsolated | private | function | Determines if a test is isolated. | |
| DrupalComponentTestListenerTrait::componentEndTest | protected | function | Reacts to the end of a test. | |
| DrupalListener::endTest | public | function | ||
| DrupalListener::startTest | public | function | ||
| DrupalStandardsListenerTrait::checkValidCoversForTest | private | function | Check an individual test run for valid @covers annotation. | |
| DrupalStandardsListenerTrait::classExists | private | function | Helper method to check if a string names a valid class or trait. | |
| DrupalStandardsListenerTrait::doEndTest | private | function | Reacts to the end of a test. | |
| DrupalStandardsListenerTrait::errorHandler | public static | function | Handles errors to ensure deprecation messages are not triggered. | |
| DrupalStandardsListenerTrait::fail | private | function | Signals a coding standards failure to the user. | |
| DrupalStandardsListenerTrait::isTestSuite | private | function | Determine if a test object is a test suite regardless of PHPUnit version. | |
| DrupalStandardsListenerTrait::standardsEndTest | protected | function | Reacts to the end of a test. | |
| ExpectDeprecationTrait::addExpectedDeprecationMessage | protected | function | Sets an expected deprecation message. | |
| ExpectDeprecationTrait::expectDeprecation | Deprecated | protected | function | Sets an expected deprecation message. |
| ExpectDeprecationTrait::expectedDeprecations | public | function | Sets expected deprecation messages. | |
| ExpectDeprecationTrait::getSymfonyTestListenerTrait | private | function | Gets the SymfonyTestsListenerTrait. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.