PHP Класс TestBase, paratest

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
call ( Object $object, string $methodName, mixed $args = null ) : mixed Calls an object method even if it is protected or private
callStatic ( string $class, string $methodName, mixed $args = null ) : mixed Calls a class method even if it is protected or private

Защищенные методы

Метод Описание
_callMethod ( $objectOrClassName, $methodName, $args = null )
copyCoverageFile ( string $fixture, string $directory = '/tmp' ) : string Copy fixture file to tmp folder, cause coverage file will be deleted by merger
findTests ( $dir )
fixture ( $fixture )
getObjectValue ( $object, $property )
getPhpUnitVersion ( ) : string Get PHPUnit version
removeDirectory ( string $dirname ) Remove dir and its files
setObjectValue ( $object, $property, $value )
skipIfCodeCoverageNotEnabled ( )

Приватные методы

Метод Описание
getAccessibleProperty ( $object, $property )

Описание методов

_callMethod() защищенный статический Метод

protected static _callMethod ( $objectOrClassName, $methodName, $args = null )

call() публичный Метод

Calls an object method even if it is protected or private
public call ( Object $object, string $methodName, mixed $args = null ) : mixed
$object Object the object to call a method on
$methodName string the method name to be called
$args mixed 0 or more arguments passed in the function
Результат mixed returns what the object's method call will return

callStatic() публичный Метод

Calls a class method even if it is protected or private
public callStatic ( string $class, string $methodName, mixed $args = null ) : mixed
$class string the class to call a method on
$methodName string the method name to be called
$args mixed 0 or more arguments passed in the function
Результат mixed returns what the object's method call will return

copyCoverageFile() защищенный Метод

Copy fixture file to tmp folder, cause coverage file will be deleted by merger
protected copyCoverageFile ( string $fixture, string $directory = '/tmp' ) : string
$fixture string Fixture coverage file name
$directory string
Результат string Copied coverage file

findTests() защищенный Метод

protected findTests ( $dir )

fixture() защищенный Метод

protected fixture ( $fixture )

getObjectValue() защищенный Метод

protected getObjectValue ( $object, $property )

getPhpUnitVersion() защищенный статический Метод

Get PHPUnit version
protected static getPhpUnitVersion ( ) : string
Результат string

removeDirectory() защищенный Метод

Remove dir and its files
protected removeDirectory ( string $dirname )
$dirname string

setObjectValue() защищенный Метод

protected setObjectValue ( $object, $property, $value )

skipIfCodeCoverageNotEnabled() защищенный статический Метод

protected static skipIfCodeCoverageNotEnabled ( )