PHP 클래스 SimpleExpectation, simpletest

Also includes various helper methods.
파일 보기 프로젝트 열기: simpletest/simpletest 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$dumper

공개 메소드들

메소드 설명
__construct ( string $message = '%s' ) Creates a dumper for displaying values and sets the test message.
isExpectation ( mixed $expectation ) : boolean Test to see if a value is an expectation object. A useful utility method.
overlayMessage ( mixed $compare, SimpleDumper $dumper ) : string Overlays the generated message onto the stored user message.
test ( mixed $compare ) : boolean Tests the expectation. True if correct.
testMessage ( mixed $compare ) : string Returns a human readable test message.

보호된 메소드들

메소드 설명
getDumper ( ) : SimpleDumper Accessor for the dumper.

메소드 상세

__construct() 공개 메소드

Creates a dumper for displaying values and sets the test message.
public __construct ( string $message = '%s' )
$message string Customised message on failure.

getDumper() 보호된 메소드

Accessor for the dumper.
protected getDumper ( ) : SimpleDumper
리턴 SimpleDumper Current value dumper.

isExpectation() 공개 정적인 메소드

Test to see if a value is an expectation object. A useful utility method.
public static isExpectation ( mixed $expectation ) : boolean
$expectation mixed Hopefully an Expectation class.
리턴 boolean True if descended from this class.

overlayMessage() 공개 메소드

An additional message can be interjected.
public overlayMessage ( mixed $compare, SimpleDumper $dumper ) : string
$compare mixed Comparison value.
$dumper SimpleDumper For formatting the results.
리턴 string Description of success or failure.

test() 공개 메소드

Tests the expectation. True if correct.
public test ( mixed $compare ) : boolean
$compare mixed 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.

프로퍼티 상세

$dumper 보호되어 있는 프로퍼티

protected $dumper