Class EventFiredWith
EventFiredWith constraint
Another glorified in_array check
Namespace: Cake\TestSuite\Constraint
Property Summary
-
$_dataKey protected
string
Event data key
-
$_dataValue protected
string
Event data value
-
$_eventManager protected
EventManager
Array of fired events
Method Summary
-
__construct() public
Constructor
-
matches() public
Checks if event is in fired array
-
toString() public
Assertion message string
Method Detail
__construct() ¶ public
__construct(EventManager $eventManager, string $dataKey, string $dataValue)
Constructor
Parameters
-
EventManager
$eventManager Event manager to check
-
string
$dataKey Data key
-
string
$dataValue Data value
matches() ¶ public
matches(mixed $other): bool
Checks if event is in fired array
Parameters
-
mixed
$other Constraint check
Returns
bool