public assertQueriesByAction ( string $action, string $message = '' ) | ||
$action | string | The action name, e.g. 'init'. |
$message | string | An optional message to override the default one. |
public function assertQueriesByAction($action, $message = '')
{
$this->readQueries();
$message = $message ? $message : 'Failed asserting that queries were triggered by action [' . $action . ']';
$iterator = new ActionsQueriesFilter(new \ArrayIterator($this->filteredQueries), $action);
\PHPUnit_Framework_Assert::assertNotEmpty(iterator_to_array($iterator), $message);
}