PHP 클래스 Eloquent\Phony\Assertion\AssertionRenderer

파일 보기 프로젝트 열기: eloquent/phony 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( MatcherVerifier $matcherVerifier, Eloquent\Phony\Exporter\Exporter $exporter, DifferenceEngine $differenceEngine, FeatureDetector $featureDetector ) Construct a new call renderer.
instance ( ) : AssertionRenderer Get the static instance of this renderer.
renderCalled ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality ) : string Render a failed called() verification.
renderCalledWith ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality, array $matchers ) : string Render a failed calledWith() verification.
renderCompleted ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality ) : string Render a failed completed() verification.
renderGenerated ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality ) : string Render a failed generated() verification.
renderGeneratorReceived ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality, Eloquent\Phony\Matcher\Matcher $value = null ) : string Render a failed generator received() verification.
renderGeneratorReceivedException ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality, Eloquent\Phony\Matcher\Matcher | Exceptio\Exception | Erro\Error | string | null $type ) : string Render a failed generator receivedException() verification.
renderGeneratorReturned ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality, Eloquent\Phony\Matcher\Matcher $value = null ) : string Render a failed generator returned() verification.
renderGeneratorThrew ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality, Eloquent\Phony\Matcher\Matcher | Exceptio\Exception | Erro\Error | string | null $type ) : string Render a failed generator threw() verification.
renderInOrder ( array $expected, array $actual ) : string Render a failed inOrder() verification.
renderIterableConsumed ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality, boolean $isGenerator ) : string Render a failed iterable consumed() verification.
renderIterableProduced ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality, boolean $isGenerator, Eloquent\Phony\Matcher\Matcher $key = null, Eloquent\Phony\Matcher\Matcher $value = null ) : string Render a failed iterable produced() verification.
renderIterableUsed ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality, boolean $isGenerator ) : string Render a failed iterable used() verification.
renderIterated ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality ) : string Render a failed iterated() verification.
renderMatchers ( array $matchers ) : string Render a sequence of matchers.
renderNoInteraction ( Eloquent\Phony\Mock\Handle\Handle $handle, array $calls ) : string Render a failed noInteraction() verification.
renderResponded ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality ) : string Render a failed responded() verification.
renderReturned ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality, Eloquent\Phony\Matcher\Matcher $value = null ) : string Render a failed responded() verification.
renderThrew ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality, Eloquent\Phony\Matcher\Matcher | string | null $type ) : string Render a failed threw() verification.
renderValue ( mixed $value ) : string Render a value.
setUseColor ( boolean | null $useColor ) Turn on or off the use of ANSI colored output.

비공개 메소드들

메소드 설명
renderCardinality ( $minimum, $maximum, $matchCount, $totalCount, $callCount, $isFailureCause )
renderEvents ( $events )

메소드 상세

__construct() 공개 메소드

Construct a new call renderer.
public __construct ( MatcherVerifier $matcherVerifier, Eloquent\Phony\Exporter\Exporter $exporter, DifferenceEngine $differenceEngine, FeatureDetector $featureDetector )
$matcherVerifier Eloquent\Phony\Matcher\MatcherVerifier The matcher verifier to use.
$exporter Eloquent\Phony\Exporter\Exporter The exporter to use.
$differenceEngine Eloquent\Phony\Difference\DifferenceEngine The difference engine to use.
$featureDetector Eloquent\Phony\Reflection\FeatureDetector The feature detector to use.

instance() 공개 정적인 메소드

Get the static instance of this renderer.
public static instance ( ) : AssertionRenderer
리턴 AssertionRenderer The static renderer.

renderCalled() 공개 메소드

Render a failed called() verification.
public renderCalled ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality ) : string
$subject Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call The subject.
$cardinality Eloquent\Phony\Verification\Cardinality The cardinality.
리턴 string The rendered failure message.

renderCalledWith() 공개 메소드

Render a failed calledWith() verification.
public renderCalledWith ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality, array $matchers ) : string
$subject Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call The subject.
$cardinality Eloquent\Phony\Verification\Cardinality The cardinality.
$matchers array
리턴 string The rendered failure message.

renderCompleted() 공개 메소드

Render a failed completed() verification.
public renderCompleted ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality ) : string
$subject Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call The subject.
$cardinality Eloquent\Phony\Verification\Cardinality The cardinality.
리턴 string The rendered failure message.

renderGenerated() 공개 메소드

Render a failed generated() verification.
public renderGenerated ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality ) : string
$subject Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call The subject.
$cardinality Eloquent\Phony\Verification\Cardinality The cardinality.
리턴 string The rendered failure message.

renderGeneratorReceived() 공개 메소드

Render a failed generator received() verification.
public renderGeneratorReceived ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality, Eloquent\Phony\Matcher\Matcher $value = null ) : string
$subject Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call The subject.
$cardinality Eloquent\Phony\Verification\Cardinality The cardinality.
$value Eloquent\Phony\Matcher\Matcher The value.
리턴 string The rendered failure message.

renderGeneratorReceivedException() 공개 메소드

Render a failed generator receivedException() verification.
public renderGeneratorReceivedException ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality, Eloquent\Phony\Matcher\Matcher | Exceptio\Exception | Erro\Error | string | null $type ) : string
$subject Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call The subject.
$cardinality Eloquent\Phony\Verification\Cardinality The cardinality.
$type Eloquent\Phony\Matcher\Matcher | Exceptio\Exception | Erro\Error | string | null The type of exception.
리턴 string The rendered failure message.

renderGeneratorReturned() 공개 메소드

Render a failed generator returned() verification.
public renderGeneratorReturned ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality, Eloquent\Phony\Matcher\Matcher $value = null ) : string
$subject Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call The subject.
$cardinality Eloquent\Phony\Verification\Cardinality The cardinality.
$value Eloquent\Phony\Matcher\Matcher The value.
리턴 string The rendered failure message.

renderGeneratorThrew() 공개 메소드

Render a failed generator threw() verification.
public renderGeneratorThrew ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality, Eloquent\Phony\Matcher\Matcher | Exceptio\Exception | Erro\Error | string | null $type ) : string
$subject Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call The subject.
$cardinality Eloquent\Phony\Verification\Cardinality The cardinality.
$type Eloquent\Phony\Matcher\Matcher | Exceptio\Exception | Erro\Error | string | null The type of exception.
리턴 string The rendered failure message.

renderInOrder() 공개 메소드

Render a failed inOrder() verification.
public renderInOrder ( array $expected, array $actual ) : string
$expected array
$actual array
리턴 string The rendered failure message.

renderIterableConsumed() 공개 메소드

Render a failed iterable consumed() verification.
public renderIterableConsumed ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality, boolean $isGenerator ) : string
$subject Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call The subject.
$cardinality Eloquent\Phony\Verification\Cardinality The cardinality.
$isGenerator boolean True if this verification is for a generator.
리턴 string The rendered failure message.

renderIterableProduced() 공개 메소드

Render a failed iterable produced() verification.
public renderIterableProduced ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality, boolean $isGenerator, Eloquent\Phony\Matcher\Matcher $key = null, Eloquent\Phony\Matcher\Matcher $value = null ) : string
$subject Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call The subject.
$cardinality Eloquent\Phony\Verification\Cardinality The cardinality.
$isGenerator boolean True if this verification is for a generator.
$key Eloquent\Phony\Matcher\Matcher The key.
$value Eloquent\Phony\Matcher\Matcher The value.
리턴 string The rendered failure message.

renderIterableUsed() 공개 메소드

Render a failed iterable used() verification.
public renderIterableUsed ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality, boolean $isGenerator ) : string
$subject Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call The subject.
$cardinality Eloquent\Phony\Verification\Cardinality The cardinality.
$isGenerator boolean True if this verification is for a generator.
리턴 string The rendered failure message.

renderIterated() 공개 메소드

Render a failed iterated() verification.
public renderIterated ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality ) : string
$subject Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call The subject.
$cardinality Eloquent\Phony\Verification\Cardinality The cardinality.
리턴 string The rendered failure message.

renderMatchers() 공개 메소드

Render a sequence of matchers.
public renderMatchers ( array $matchers ) : string
$matchers array
리턴 string The rendered matchers.

renderNoInteraction() 공개 메소드

Render a failed noInteraction() verification.
public renderNoInteraction ( Eloquent\Phony\Mock\Handle\Handle $handle, array $calls ) : string
$handle Eloquent\Phony\Mock\Handle\Handle The handle.
$calls array
리턴 string The rendered failure message.

renderResponded() 공개 메소드

Render a failed responded() verification.
public renderResponded ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality ) : string
$subject Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call The subject.
$cardinality Eloquent\Phony\Verification\Cardinality The cardinality.
리턴 string The rendered failure message.

renderReturned() 공개 메소드

Render a failed responded() verification.
public renderReturned ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality, Eloquent\Phony\Matcher\Matcher $value = null ) : string
$subject Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call The subject.
$cardinality Eloquent\Phony\Verification\Cardinality The cardinality.
$value Eloquent\Phony\Matcher\Matcher The value.
리턴 string The rendered failure message.

renderThrew() 공개 메소드

Render a failed threw() verification.
public renderThrew ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, Cardinality $cardinality, Eloquent\Phony\Matcher\Matcher | string | null $type ) : string
$subject Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call The subject.
$cardinality Eloquent\Phony\Verification\Cardinality The cardinality.
$type Eloquent\Phony\Matcher\Matcher | string | null The type of exception.
리턴 string The rendered failure message.

renderValue() 공개 메소드

Render a value.
public renderValue ( mixed $value ) : string
$value mixed The value.
리턴 string The rendered value.

setUseColor() 공개 메소드

Pass null to detect automatically.
public setUseColor ( boolean | null $useColor )
$useColor boolean | null True to use color.