abstract class TestCase extends TestCase

internal  This class is not covered by the backward compatibility promise
 

Methods

Constraint
createConstraint(mixed ...$args)

No description

static string
getConstraintClass()

Returns constraint's class name.

Constraint
examineCreateConstraint(array $args)

No description

void
examineConstraintUnaryOperatorFailure(array $args, mixed $actual, string $message)

Tests whether the constraint throws expected exception with expected message when wrapped with an unary operator.

void
examineConstraintMatchSucceeds(array $args, mixed $actual)

No description

void
examineConstraintMatchFails(array $args, mixed $actual, string $message)

No description

void
examineNotConstraintMatchSucceeds(array $args, mixed $actual)

No description

void
examineNotConstraintMatchFails(array $args, mixed $actual, string $message)

No description

UnaryOperator
wrapWithUnaryOperator(Constraint $constraint, string $operator = 'noop', int $precedence = 1)

Returns $constraint wrapped with UnaryOperator mock.

Details

at line 29
abstract Constraint createConstraint(mixed ...$args)

No description

Parameters

mixed ...$args

Return Value

Constraint

at line 38
abstract static string getConstraintClass()

Returns constraint's class name.

Return Value

string

at line 49
final Constraint examineCreateConstraint(array $args)

No description

Parameters

array $args

arguments for createConstraint()

Return Value

Constraint

Exceptions

Exception
ExpectationFailedException
InvalidArgumentException

at line 71
final void examineConstraintUnaryOperatorFailure(array $args, mixed $actual, string $message)

Tests whether the constraint throws expected exception with expected message when wrapped with an unary operator.

Parameters

array $args

arguments for createConstraint()

mixed $actual

actual value that shall cause the constraint to fail

string $message

expected exception message

Return Value

void

Exceptions

Exception
ExpectationFailedException
ReflectionException
RuntimeException
InvalidArgumentException

at line 94
final void examineConstraintMatchSucceeds(array $args, mixed $actual)

No description

Parameters

array $args

arguments passed to createConstraint()

mixed $actual

actual value

Return Value

void

Exceptions

ExpectationFailedException
InvalidArgumentException

at line 109
final void examineConstraintMatchFails(array $args, mixed $actual, string $message)

No description

Parameters

array $args

arguments passed to createConstraint()

mixed $actual
string $message

Return Value

void

Exceptions

ExpectationFailedException
InvalidArgumentException
CircularDependencyException

at line 129
final void examineNotConstraintMatchSucceeds(array $args, mixed $actual)

No description

Parameters

array $args

arguments passed to createConstraint()

mixed $actual

Return Value

void

Exceptions

ExpectationFailedException
InvalidArgumentException

at line 143
final void examineNotConstraintMatchFails(array $args, mixed $actual, string $message)

No description

Parameters

array $args

arguments passed to createConstraint()

mixed $actual
string $message

Return Value

void

Exceptions

ExpectationFailedException
InvalidArgumentException

at line 163
final protected UnaryOperator wrapWithUnaryOperator(Constraint $constraint, string $operator = 'noop', int $precedence = 1)

Returns $constraint wrapped with UnaryOperator mock.

Parameters

Constraint $constraint
string $operator
int $precedence

Return Value

UnaryOperator

Exceptions

Exception
RuntimeException
ReflectionException