PHP 클래스 PatternExpectation, simpletest

상속: extends SimpleExpectation
파일 보기 프로젝트 열기: simpletest/simpletest 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string $pattern, string $message = '%s' ) Sets the value to compare against.
test ( string $compare ) : boolean Tests the expectation. True if the Perl regex matches the comparison value.
testMessage ( mixed $compare ) : string Returns a human readable test message.

보호된 메소드들

메소드 설명
describePatternMatch ( string $pattern, string $subject ) Describes a pattern match including the string found and it's position.
getPattern ( ) : string Accessor for the pattern.

메소드 상세

__construct() 공개 메소드

Sets the value to compare against.
public __construct ( string $pattern, string $message = '%s' )
$pattern string Pattern to search for.
$message string Customised message on failure.

describePatternMatch() 보호된 메소드

Describes a pattern match including the string found and it's position.
protected describePatternMatch ( string $pattern, string $subject )
$pattern string Regex to match against.
$subject string Subject to search.

getPattern() 보호된 메소드

Accessor for the pattern.
protected getPattern ( ) : string
리턴 string Perl regex as string.

test() 공개 메소드

Tests the expectation. True if the Perl regex matches the comparison value.
public test ( string $compare ) : boolean
$compare string Comparison value.
리턴 boolean True if correct.

testMessage() 공개 메소드

Returns a human readable test message.
public testMessage ( mixed $compare ) : string
$compare mixed Comparison value.
리턴 string Description of success or failure.