• internal This class is not covered by the backward compatibility promise for PHPUnit
CloneableFinalInstantiable
ImplementsPHPUnit\Runner\TestResultCache
Serializable
Constants
public PHPUnit\Runner\DefaultTestResultCache::DEFAULT_RESULT_CACHE_FILENAME = '.phpunit.result.cache'
 
  • var string
Methods
public __construct(?string $filepath = NULL)
public clear() : void
public copyStateToCache(self $targetCache) : void
public getState(string $testName) : int
public getTime(string $testName) : float
public load() : void
public persist() : void
public saveToFile() : void
public serialize() : string
public setState(string $testName, int $state) : void
public setTime(string $testName, float $time) : void
public unserialize( $serialized) : void
 
    Constants
    private PHPUnit\Runner\DefaultTestResultCache::ALLOWED_CACHE_TEST_STATUSES = [1, 2, 3, 4, 5, 6]
     

    Provide extra protection against incomplete or corrupt caches

    • var int[]
    Properties
    private $cacheFilename
     

    Path and filename for result cache file

    • var string
    private $defects
     

    The list of defective tests


    // Mark a test skipped
    $this->defects[$testName] = BaseTestRunner::TEST_SKIPPED;

    • var array
    private $times
     

    The list of execution duration of suites and tests (in seconds)


    // Record running time for test
    $this->times[$testName] = 1.234;

    • var array
    © 2020 Bruce Wells
    Search Namespaces \ Classes
    ConfigurationNumbers (0-9.) only