function TestDiscoveryCacheContext::getContext

Overrides CacheContextInterface::getContext

File

core/modules/simpletest/src/Cache/Context/TestDiscoveryCacheContext.php, line 66

Class

TestDiscoveryCacheContext
Defines the TestDiscoveryCacheContext service.

Namespace

Drupal\simpletest\Cache\Context

Code

public function getContext() {
    if (empty($this->hash)) {
        $tests = $this->testDiscovery
            ->getTestClasses();
        $this->hash = $this->hash(serialize($tests));
    }
    return $this->hash;
}

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