• internal This class is not covered by the backward compatibility promise for PHPUnit
CloneableFinalInstantiable
Constants
public PHPUnit\Util\Test::LARGE = 2
 


  • var int
public PHPUnit\Util\Test::MEDIUM = 1
 


  • var int
public PHPUnit\Util\Test::SMALL = 0
 


  • var int
public PHPUnit\Util\Test::UNKNOWN = -1
 


  • var int
Methods
public static describe(PHPUnit\Framework\Test $test) : array
 


  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
public static describeAsString(PHPUnit\Framework\Test $test) : string
public static getBackupSettings(string $className, string $methodName) : array
 


  • psalm-param class-string $className
public static getClassProcessIsolationSettings(string $className, string $methodName) : bool
 


  • psalm-param class-string $className
public static getDependencies(string $className, string $methodName) : array
 


  • psalm-param class-string $className
public static getExpectedException(string $className, string $methodName)
 
Returns the expected exception for a test.

  • return array|bool
  • deprecated
  • codeCoverageIgnore
  • psalm-param class-string $className
public static getGroups(string $className, ?string $methodName = '') : array
 


  • psalm-param class-string $className
public static getHookMethods(string $className) : array
 


  • psalm-param class-string $className
public static getInlineAnnotations(string $className, string $methodName) : array
 


  • psalm-param class-string $className
public static getLinesToBeCovered(string $className, string $methodName)
 


  • throws CodeCoverageException
  • return array|bool
  • psalm-param class-string $className
public static getLinesToBeUsed(string $className, string $methodName) : array
 
Returns lines of code specified with the @uses annotation.

  • throws CodeCoverageException
  • psalm-param class-string $className
public static getMissingRequirements(string $className, string $methodName) : array
 
Returns the missing requirements for a test.

public static getPreserveGlobalStateSettings(string $className, string $methodName) : bool
 


  • psalm-param class-string $className
public static getProcessIsolationSettings(string $className, string $methodName) : bool
 


  • psalm-param class-string $className
public static getProvidedData(string $className, string $methodName) : array
 
Returns the provided data for a method.

public static getRequirements(string $className, string $methodName) : array
 


public static getSize(string $className, ?string $methodName) : int
 


  • psalm-param class-string $className
public static isTestMethod(ReflectionMethod $method) : bool
public static parseTestMethodAnnotations(string $className, ?string $methodName = '') : array
 


  • psalm-param class-string $className
public static requiresCodeCoverageDataCollection(PHPUnit\Framework\TestCase $test) : bool
Properties
private static $hookMethods
 


  • var array
Methods
private static emptyHookMethodsArray() : array
private static ensureOperatorIsValid(string $operator) : void
private static getBooleanAnnotationSetting(string $className, ?string $methodName, string $settingName) : bool
 


  • psalm-param class-string $className
private static getLinesToBeCoveredOrUsed(string $className, string $methodName, string $mode) : array
 


  • throws CodeCoverageException
  • psalm-param class-string $className
private static mergeArraysRecursively(array $a, array $b) : array
 
Merge two arrays together.

If an integer key exists in both arrays and preserveNumericKeys is false, the value
from the second array will be appended to the first array. If both values are arrays, they
are merged together, else the value of the second array overwrites the one of the first array.

This implementation is copied from https://github.com/zendframework/zend-stdlib/blob/76b653c5e99b40eccf5966e3122c90615134ae46/src/ArrayUtils.php

Zend Framework (http://framework.zend.com/)

  • link http://github.com/zendframework/zf2for the canonical source repository
  • copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  • license http://framework.zend.com/license/new-bsd New BSD License
private static resolveElementToReflectionObjects(string $element) : array
 


  • throws InvalidCoversTargetException
private static resolveReflectionObjectsToLines(array $reflectors) : array
private static sanitizeVersionNumber(string $version)
 
Trims any extensions from version string that follows after the .[.] format

private static shouldCoversAnnotationBeUsed(array $annotations) : bool
Properties
private static $hookMethods
 


  • var array
Methods
public static describe(PHPUnit\Framework\Test $test) : array
 


  • throws SebastianBergmann\RecursionContext\InvalidArgumentException
public static describeAsString(PHPUnit\Framework\Test $test) : string
private static emptyHookMethodsArray() : array
private static ensureOperatorIsValid(string $operator) : void
public static getBackupSettings(string $className, string $methodName) : array
 


  • psalm-param class-string $className
private static getBooleanAnnotationSetting(string $className, ?string $methodName, string $settingName) : bool
 


  • psalm-param class-string $className
public static getClassProcessIsolationSettings(string $className, string $methodName) : bool
 


  • psalm-param class-string $className
public static getDependencies(string $className, string $methodName) : array
 


  • psalm-param class-string $className
public static getExpectedException(string $className, string $methodName)
 
Returns the expected exception for a test.

  • return array|bool
  • deprecated
  • codeCoverageIgnore
  • psalm-param class-string $className
public static getGroups(string $className, ?string $methodName = '') : array
 


  • psalm-param class-string $className
public static getHookMethods(string $className) : array
 


  • psalm-param class-string $className
public static getInlineAnnotations(string $className, string $methodName) : array
 


  • psalm-param class-string $className
public static getLinesToBeCovered(string $className, string $methodName)
 


  • throws CodeCoverageException
  • return array|bool
  • psalm-param class-string $className
private static getLinesToBeCoveredOrUsed(string $className, string $methodName, string $mode) : array
 


  • throws CodeCoverageException
  • psalm-param class-string $className
public static getLinesToBeUsed(string $className, string $methodName) : array
 
Returns lines of code specified with the @uses annotation.

  • throws CodeCoverageException
  • psalm-param class-string $className
public static getMissingRequirements(string $className, string $methodName) : array
 
Returns the missing requirements for a test.

public static getPreserveGlobalStateSettings(string $className, string $methodName) : bool
 


  • psalm-param class-string $className
public static getProcessIsolationSettings(string $className, string $methodName) : bool
 


  • psalm-param class-string $className
public static getProvidedData(string $className, string $methodName) : array
 
Returns the provided data for a method.

public static getRequirements(string $className, string $methodName) : array
 


public static getSize(string $className, ?string $methodName) : int
 


  • psalm-param class-string $className
public static isTestMethod(ReflectionMethod $method) : bool
private static mergeArraysRecursively(array $a, array $b) : array
 
Merge two arrays together.

If an integer key exists in both arrays and preserveNumericKeys is false, the value
from the second array will be appended to the first array. If both values are arrays, they
are merged together, else the value of the second array overwrites the one of the first array.

This implementation is copied from https://github.com/zendframework/zend-stdlib/blob/76b653c5e99b40eccf5966e3122c90615134ae46/src/ArrayUtils.php

Zend Framework (http://framework.zend.com/)

  • link http://github.com/zendframework/zf2for the canonical source repository
  • copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  • license http://framework.zend.com/license/new-bsd New BSD License
public static parseTestMethodAnnotations(string $className, ?string $methodName = '') : array
 


  • psalm-param class-string $className
public static requiresCodeCoverageDataCollection(PHPUnit\Framework\TestCase $test) : bool
private static resolveElementToReflectionObjects(string $element) : array
 


  • throws InvalidCoversTargetException
private static resolveReflectionObjectsToLines(array $reflectors) : array
private static sanitizeVersionNumber(string $version)
 
Trims any extensions from version string that follows after the .[.] format

private static shouldCoversAnnotationBeUsed(array $annotations) : bool
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only