PHP Класс Eloquent\Phony\Assertion\AssertionRenderer

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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.