abstract class TestCase extends TestCase

internal  This class is not covered by the backward compatibility promise
 

Methods

static 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 an UnaryOperator.

__construct(Constraint $constraint, string $operator, int $precedence)

No description

string
operator()

No description

int
precedence()

No description

Details

at line 34
abstract static Constraint createConstraint(mixed ...$args)

No description

Parameters

mixed ...$args

Return Value

Constraint

at line 43
abstract static string getConstraintClass()

Returns constraint's class name.

Return Value

string

at line 54
final Constraint examineCreateConstraint(array $args)

No description

Parameters

array $args

arguments for createConstraint()

Return Value

Constraint

Exceptions

Exception
ExpectationFailedException
InvalidArgumentException

at line 76
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 99
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 114
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
CircularDependencyException
InvalidArgumentException

at line 134
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 148
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 168
final protected UnaryOperator wrapWithUnaryOperator(Constraint $constraint, string $operator = 'noop', int $precedence = 1)

Returns $constraint wrapped with an UnaryOperator.

Parameters

Constraint $constraint
string $operator
int $precedence

Return Value

UnaryOperator

Exceptions

Exception
RuntimeException
ReflectionException

at line 180
__construct(Constraint $constraint, string $operator, int $precedence)

No description

Parameters

Constraint $constraint
string $operator
int $precedence

at line 187
string operator()

No description

Return Value

string

at line 192
int precedence()

No description

Return Value

int