Class KeysMatcher
KeysMatcher determines if the actual array or object has the expected keys. If the Assertion has a 'contain' flag set, it will check if the expected keys are included in the object or array.
- Peridot\Leo\Matcher\AbstractMatcher implements Peridot\Leo\Matcher\MatcherInterface
- Peridot\Leo\Matcher\KeysMatcher
public
|
|
protected
mixed
|
|
protected
|
#
getArrayValue( object|array $actual )
Normalize the actual value into an array, whether it is an object or an array. |
protected
string
|
|
protected
true
|
#
matchInclusion( array $actual )
Used when the 'contain' flag exists on the Assertion. Checks if the expected keys are included in the object or array. |
__construct(),
getTemplate(),
invert(),
isNegated(),
match(),
setAssertion(),
setTemplate()
|
protected
string
|
$verb
The verb used in the template. Uses "have" if the 'contain' flag is not used, otherwise "contain" is used. |
#
'have'
|
$assertion,
$expected,
$negated,
$template
|