trait ExtendsClassTrait

Methods

static void
assertThat(mixed $value, Constraint $constraint, string $message = '')

Evaluates a \PHPUnit\Framework\Constraint\Constraint matcher object.

static void
assertExtendsClass(string $parent, mixed $subject, string $message = '')

Asserts that $subject extends the class $parent.

static void
assertNotExtendsClass(string $parent, mixed $subject, string $message = '')

Asserts that $subject does not extend the class $parent.

static ExtendsClass
extendsClass(string $parent)

Checks objects (an classes) that they extend $parent class.

Details

at line 29
abstract static void assertThat(mixed $value, Constraint $constraint, string $message = '')

Evaluates a \PHPUnit\Framework\Constraint\Constraint matcher object.

Parameters

mixed $value
Constraint $constraint
string $message

Return Value

void

Exceptions

ExpectationFailedException
InvalidArgumentException

at line 42
static void assertExtendsClass(string $parent, mixed $subject, string $message = '')

Asserts that $subject extends the class $parent.

Parameters

string $parent

name of the class that is supposed to be extended by $subject

mixed $subject

an object or a class name that is being examined

string $message

custom message

Return Value

void

Exceptions

ExpectationFailedException
InvalidArgumentException
InvalidArgumentException

at line 58
static void assertNotExtendsClass(string $parent, mixed $subject, string $message = '')

Asserts that $subject does not extend the class $parent.

Parameters

string $parent

name of the class that is expected to be extended by $subject

mixed $subject

an object or a class name that is being examined

string $message

custom message

Return Value

void

Exceptions

ExpectationFailedException
InvalidArgumentException
InvalidArgumentException

at line 70
static ExtendsClass extendsClass(string $parent)

Checks objects (an classes) that they extend $parent class.

Parameters

string $parent

name of the class that is expected to be extended

Return Value

ExtendsClass

Exceptions

InvalidArgumentException