src/Codeception/Module/WPQueries.php
public function assertQueriesByStatement($statement, $message = '')
    {
        $this->readQueries();
        $message = $message ?: 'Failed asserting that queries beginning with statement [' . $statement . '] were made.';
        $statementIterator = new MainStatementQueriesFilter(new \ArrayIterator($this->filteredQueries), $statement);
        Assert::assertNotEmpty(iterator_to_array($statementIterator), $message);
    }
public function assertQueriesByStatement($statement, $message = '')
    {
        $this->readQueries();
        $message = $message ?: 'Failed asserting that queries beginning with statement [' . $statement . '] were made.';
        $statementIterator = new MainStatementQueriesFilter(new \ArrayIterator($this->filteredQueries), $statement);
        Assert::assertNotEmpty(iterator_to_array($statementIterator), $message);
    }
public function assertQueriesByStatement ( $ statement , $ message = '' ) { $ this -> readQueries ( ) ; $ message = $ message ? : 'Failed asserting that queries beginning with statement [' . $ statement . '] were made.' ; $ statementIterator = new MainStatementQueriesFilter ( new \ ArrayIterator ( $ this -> filteredQueries ) , $ statement ) ; Assert :: assertNotEmpty ( iterator_to_array ( $ statementIterator ) , $ message ) ; }
Asserts that at least a query starting with the specified statement was made.

Queries generated by `setUp`, `tearDown` and `factory` methods are excluded by default.

@example
```php
wp_cache_flush();
cached_get_posts($args);
$I->assertQueriesByStatement('SELECT');
```

@param string $statement A simple string the statement should start with or a valid regular expression.
Regular expressions must contain delimiters.
@param string $message An optional message to override the default one.
Asserts that at least a query starting with the specified statement was made .