PHP 클래스 PHPUnit_Framework_Constraint, phpunit

저자: Sebastian Bergmann ([email protected])
상속: implements Countable, implements PHPUnit_Framework_SelfDescribing
파일 보기 프로젝트 열기: sebastianbergmann/phpunit 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$exporter

공개 메소드들

메소드 설명
__construct ( )
count ( ) : integer Counts the number of constraint elements.
evaluate ( mixed $other, string $description = '', boolean $returnResult = false ) : mixed Evaluates the constraint for parameter $other

보호된 메소드들

메소드 설명
additionalFailureDescription ( mixed $other ) : string Return additional failure description where needed
fail ( mixed $other, string $description, SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure = null ) Throws an exception for the given compared value and test description
failureDescription ( mixed $other ) : string Returns the description of the failure
matches ( mixed $other ) : boolean Evaluates the constraint for parameter $other. Returns true if the constraint is met, false otherwise.

메소드 상세

__construct() 공개 메소드

public __construct ( )

additionalFailureDescription() 보호된 메소드

The function can be overridden to provide additional failure information like a diff
protected additionalFailureDescription ( mixed $other ) : string
$other mixed Evaluated value or object.
리턴 string

count() 공개 메소드

Counts the number of constraint elements.
public count ( ) : integer
리턴 integer

evaluate() 공개 메소드

If $returnResult is set to false (the default), an exception is thrown in case of a failure. null is returned otherwise. If $returnResult is true, the result of the evaluation is returned as a boolean value instead: true in case of success, false in case of a failure.
public evaluate ( mixed $other, string $description = '', boolean $returnResult = false ) : mixed
$other mixed Value or object to evaluate.
$description string Additional information about the test
$returnResult boolean Whether to return a result or throw an exception
리턴 mixed

fail() 보호된 메소드

Throws an exception for the given compared value and test description
protected fail ( mixed $other, string $description, SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure = null )
$other mixed Evaluated value or object.
$description string Additional information about the test
$comparisonFailure SebastianBergmann\Comparator\ComparisonFailure

failureDescription() 보호된 메소드

The beginning of failure messages is "Failed asserting that" in most cases. This method should return the second part of that sentence. To provide additional failure information additionalFailureDescription can be used.
protected failureDescription ( mixed $other ) : string
$other mixed Evaluated value or object.
리턴 string

matches() 보호된 메소드

This method can be overridden to implement the evaluation algorithm.
protected matches ( mixed $other ) : boolean
$other mixed Value or object to evaluate.
리턴 boolean

프로퍼티 상세

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

protected $exporter