src/Codeception/Module/WPQueries.php
public function assertQueriesByMethod($class, $method, $message = '')
    {
        $this->readQueries();
        $class = ltrim($class, '\\');
        $message = $message ?: 'Failed asserting that queries were made by method [' . $class . '::' . $method . ']';
        $statementIterator = new ClassMethodQueriesFilter(new \ArrayIterator($this->filteredQueries), $class, $method);
        Assert::assertNotEmpty(iterator_to_array($statementIterator), $message);
    }
public function assertQueriesByMethod($class, $method, $message = '')
    {
        $this->readQueries();
        $class = ltrim($class, '\\');
        $message = $message ?: 'Failed asserting that queries were made by method [' . $class . '::' . $method . ']';
        $statementIterator = new ClassMethodQueriesFilter(new \ArrayIterator($this->filteredQueries), $class, $method);
        Assert::assertNotEmpty(iterator_to_array($statementIterator), $message);
    }
public function assertQueriesByMethod ( $ class , $ method , $ message = '' ) { $ this -> readQueries ( ) ; $ class = ltrim ( $ class , '\\' ) ; $ message = $ message ? : 'Failed asserting that queries were made by method [' . $ class . '::' . $ method . ']' ; $ statementIterator = new ClassMethodQueriesFilter ( new \ ArrayIterator ( $ this -> filteredQueries ) , $ class , $ method ) ; Assert :: assertNotEmpty ( iterator_to_array ( $ statementIterator ) , $ message ) ; }
Asserts that at least one query has been made by the specified class method.

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

@example
```php
$options = new Acme\Options();
$options->update('showAds', false);
$I->assertQueriesByMethod('Acme\Options', 'update');
```

@param string $class The fully qualified name of the class to check.
@param string $method The name of the method to check.
@param string $message An optional message to override the default one.
Asserts that at least one query has been made by the specified class method .