PHP 클래스 QCheck\Annotation

파일 보기 프로젝트 열기: steos/php-quickcheck

공개 메소드들

메소드 설명
check ( callable $f, callable $p = null, integer $n = 10 ) : array Determine the generators needed to test the function $f and then use the predicate $p to assert correctness.
getReflection ( callable $f ) : ReflectionFunction | ReflectionMethod Return the correct reflection class for the given callable.
register ( string $type, Generator $generator ) Associate a generator to a given type.
types ( callable $f ) : array Return the types for the given callable.

메소드 상세

check() 공개 정적인 메소드

If $p is omitted, will simply check that $f returns true for each generated values.
public static check ( callable $f, callable $p = null, integer $n = 10 ) : array
$f callable The function to test
$p callable The predicate
$n integer number of iteration
리턴 array

getReflection() 공개 정적인 메소드

Return the correct reflection class for the given callable.
public static getReflection ( callable $f ) : ReflectionFunction | ReflectionMethod
$f callable
리턴 ReflectionFunction | ReflectionMethod

register() 공개 정적인 메소드

Associate a generator to a given type.
public static register ( string $type, Generator $generator )
$type string
$generator Generator Tĥe generator associated with the type

types() 공개 정적인 메소드

Return the types for the given callable.
public static types ( callable $f ) : array
$f callable
리턴 array