PHP Class AbstractTestCase

Inheritance: extends GrahamCampbell\TestBench\AbstractPackageTestCase
Mostrar archivo Open project: owl/owl Class Usage Examples

Public Methods

Method Description
getPropertyValue ( object $object, string $name ) : mixed Privateプロパティを取得する
invokeMethod ( object $object, string $name, array $args ) Privateメソッド実行する
setInaccessibleProp ( object $object, array $propToValue ) オブジェクトのPrivateプロパティに値を代入する

Private Methods

Method Description
getPrivateMethod ( mixed $class, string $name ) Privateメソッドをアクセス可能な状態で取得する
getPrivateProperty ( mixed $class, string $name ) Privateプロパティをアクセス可能な状態で取得する

Method Details

getPropertyValue() public static method

Privateプロパティを取得する
public static getPropertyValue ( object $object, string $name ) : mixed
$object object 対象オブジェクト
$name string プロパティ名
return mixed プロパティの値

invokeMethod() public static method

Privateメソッド実行する
public static invokeMethod ( object $object, string $name, array $args )
$object object メソッドを実行するオブジェクト
$name string メソッド名
$args array 引数

setInaccessibleProp() public method

オブジェクトのPrivateプロパティに値を代入する
public setInaccessibleProp ( object $object, array $propToValue )
$object object 対象のオブジェクト
$propToValue array 対象のプロパティと代入値をマッピングした連想配列 - array($propName => $value)