Свойство | Type | Description | |
---|---|---|---|
$assertions | callable[] | ||
$filteredQueries | array | ||
$wpdb | wpdb |
Méthode | Description | |
---|---|---|
__construct ( Codeception\Lib\ModuleContainer $moduleContainer, null $config, tad\WPBrowser\Environment\Constants $constants = null, wpdb | null $wpdb = null ) | WPQueries constructor. | |
_cleanup ( ) | Runs before each test method. | |
_getFilteredQueriesIterator ( wpdb $wpdb = null ) : FilterIterator | Returns the saved queries after filtering. | |
_initialize ( ) | ||
assertCountQueries ( integer $n, string $message = '' ) | Asserts that n queries have been made. | |
assertNotQueries ( string $message = '' ) | Asserts that no queries were made. | |
assertNotQueriesByAction ( string $action, string $message = '' ) | Asserts that no queries were made as a consequence of the specified action. | |
assertNotQueriesByFilter ( string $filter, string $message = '' ) | Asserts that no queries were made as a consequence of the specified filter. | |
assertNotQueriesByFunction ( string $function, string $message = '' ) | Asserts that no queries were made by the specified function. | |
assertNotQueriesByMethod ( $class, $method, string $message = '' ) | Asserts that no queries have been made by the specified class method. | |
assertNotQueriesByStatement ( string $statement, string $message = '' ) | Asserts that no queries have been made by the specified class method. | |
assertNotQueriesByStatementAndAction ( string $statement, string $action, string $message = '' ) | Asserts that no queries were made as a consequence of the specified action containing the specified SQL statement. | |
assertNotQueriesByStatementAndFilter ( string $statement, string $filter, string $message = '' ) | Asserts that no queries were made as a consequence of the specified filter containing the specified SQL statement. | |
assertNotQueriesByStatementAndFunction ( string $statement, string $function, string $message = '' ) | Asserts that no queries were made by the specified function starting with the specified SQL statement. | |
assertNotQueriesByStatementAndMethod ( string $statement, string $class, string $method, string $message = '' ) | Asserts that no queries were made by the specified class method starting with the specified SQL statement. | |
assertQueries ( string $message = '' ) | Asserts that at least one query was made during the test. | |
assertQueriesByAction ( string $action, string $message = '' ) | Asserts that at least one query was made as a consequence of the specified action. | |
assertQueriesByFilter ( string $filter, string $message = '' ) | Asserts that at least one query was made as a consequence of the specified filter. | |
assertQueriesByFunction ( string $function, string $message = '' ) | Asserts that queries were made by the specified function. | |
assertQueriesByMethod ( string $class, string $method, string $message = '' ) | Asserts that at least one query has been made by the specified class method. | |
assertQueriesByStatement ( string $statement, string $message = '' ) | Asserts that at least a query starting with the specified statement was made. | |
assertQueriesByStatementAndAction ( string $statement, string $action, string $message = '' ) | Asserts that at least one query was made as a consequence of the specified action containing the specified SQL statement. | |
assertQueriesByStatementAndFilter ( string $statement, string $filter, string $message = '' ) | Asserts that at least one query was made as a consequence of the specified filter containing the specified SQL statement. | |
assertQueriesByStatementAndFunction ( string $statement, string $function, string $message = '' ) | Asserts that queries were made by the specified function starting with the specified SQL statement. | |
assertQueriesByStatementAndMethod ( string $statement, string $class, string $method, string $message = '' ) | Asserts that queries were made by the specified class method starting with the specified SQL statement. | |
assertQueriesCountByAction ( integer $n, string $action, string $message = '' ) | Asserts that n queries were made as a consequence of the specified action. | |
assertQueriesCountByFilter ( integer $n, string $filter, string $message = '' ) | Asserts that n queries were made as a consequence of the specified filter. | |
assertQueriesCountByFunction ( integer $n, string $function, string $message = '' ) | Asserts that n queries were made by the specified function. | |
assertQueriesCountByMethod ( integer $n, string $class, string $method, string $message = '' ) | Asserts that n queries have been made by the specified class method. | |
assertQueriesCountByStatement ( integer $n, string $statement, string $message = '' ) | Asserts that n queries starting with the specified statement were made. | |
assertQueriesCountByStatementAndAction ( integer $n, string $statement, string $action, string $message = '' ) | Asserts that n queries were made as a consequence of the specified action containing the specified SQL statement. | |
assertQueriesCountByStatementAndFilter ( integer $n, string $statement, string $filter, string $message = '' ) | Asserts that n queries were made as a consequence of the specified filter containing the specified SQL statement. | |
assertQueriesCountByStatementAndFunction ( integer $n, string $statement, string $function, string $message = '' ) | Asserts that n queries were made by the specified function starting with the specified SQL statement. | |
assertQueriesCountByStatementAndMethod ( integer $n, string $statement, string $class, string $method, string $message = '' ) | Asserts that n queries were made by the specified class method starting with the specified SQL statement. |
Méthode | Description | |
---|---|---|
getWpdbInstance ( ) : wpdb | ||
readQueries ( ) |
public __construct ( Codeception\Lib\ModuleContainer $moduleContainer, null $config, tad\WPBrowser\Environment\Constants $constants = null, wpdb | null $wpdb = null ) | ||
$moduleContainer | Codeception\Lib\ModuleContainer | |
$config | null | |
$constants | tad\WPBrowser\Environment\Constants | |
$wpdb | wpdb | null |
public _getFilteredQueriesIterator ( wpdb $wpdb = null ) : FilterIterator | ||
$wpdb | wpdb | |
Résultat | FilterIterator |
public assertCountQueries ( integer $n, string $message = '' ) | ||
$n | integer | The expected number of queries. |
$message | string | An optional message to override the default one. |
public assertNotQueries ( string $message = '' ) | ||
$message | string | An optional message to override the default one. |
public assertNotQueriesByAction ( string $action, string $message = '' ) | ||
$action | string | The action name, e.g. 'init'. |
$message | string | An optional message to override the default one. |
public assertNotQueriesByFilter ( string $filter, string $message = '' ) | ||
$filter | string | The filter name, e.g. 'posts_where'. |
$message | string | An optional message to override the default one. |
public assertNotQueriesByFunction ( string $function, string $message = '' ) | ||
$function | string | |
$message | string | An optional message to override the default one. |
public assertNotQueriesByMethod ( $class, $method, string $message = '' ) | ||
$class | ||
$method | ||
$message | string | An optional message to override the default one. |
public assertNotQueriesByStatement ( string $statement, string $message = '' ) | ||
$statement | string | A simple string the statement should start with or a valid regular expression. Regular expressions must contain delimiters. |
$message | string | An optional message to override the default one. |
public assertNotQueriesByStatementAndAction ( string $statement, string $action, string $message = '' ) | ||
$statement | string | A simple string the statement should start with or a valid regular expression. Regular expressions must contain delimiters. |
$action | string | The action name, e.g. 'init'. |
$message | string | An optional message to override the default one. |
public assertNotQueriesByStatementAndFilter ( string $statement, string $filter, string $message = '' ) | ||
$statement | string | A simple string the statement should start with or a valid regular expression. Regular expressions must contain delimiters. |
$filter | string | The filter name, e.g. 'posts_where'. |
$message | string | An optional message to override the default one. |
public assertNotQueriesByStatementAndFunction ( string $statement, string $function, string $message = '' ) | ||
$statement | string | A simple string the statement should start with or a valid regular expression. Regular expressions must contain delimiters. |
$function | string | |
$message | string | An optional message to override the default one. |
public assertNotQueriesByStatementAndMethod ( string $statement, string $class, string $method, string $message = '' ) | ||
$statement | string | A simple string the statement should start with or a valid regular expression. Regular expressions must contain delimiters. |
$class | string | |
$method | string | |
$message | string | An optional message to override the default one. |
public assertQueries ( string $message = '' ) | ||
$message | string | An optional message to override the default one. |
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 assertQueriesByFilter ( string $filter, string $message = '' ) | ||
$filter | string | The filter name, e.g. 'posts_where'. |
$message | string | An optional message to override the default one. |
public assertQueriesByFunction ( string $function, string $message = '' ) | ||
$function | string | |
$message | string | An optional message to override the default one. |
public assertQueriesByStatement ( string $statement, string $message = '' ) | ||
$statement | string | A simple string the statement should start with or a valid regular expression. Regular expressions must contain delimiters. |
$message | string | An optional message to override the default one. |
public assertQueriesByStatementAndAction ( string $statement, string $action, string $message = '' ) | ||
$statement | string | A simple string the statement should start with or a valid regular expression. Regular expressions must contain delimiters. |
$action | string | The action name, e.g. 'init'. |
$message | string | An optional message to override the default one. |
public assertQueriesByStatementAndFilter ( string $statement, string $filter, string $message = '' ) | ||
$statement | string | A simple string the statement should start with or a valid regular expression. Regular expressions must contain delimiters. |
$filter | string | The filter name, e.g. 'posts_where'. |
$message | string | An optional message to override the default one. |
public assertQueriesByStatementAndFunction ( string $statement, string $function, string $message = '' ) | ||
$statement | string | A simple string the statement should start with or a valid regular expression. Regular expressions must contain delimiters. |
$function | string | |
$message | string | An optional message to override the default one. |
public assertQueriesByStatementAndMethod ( string $statement, string $class, string $method, string $message = '' ) | ||
$statement | string | A simple string the statement should start with or a valid regular expression. Regular expressions must contain delimiters. |
$class | string | |
$method | string | |
$message | string | An optional message to override the default one. |
public assertQueriesCountByStatement ( integer $n, string $statement, string $message = '' ) | ||
$n | integer | The expected number of queries. |
$statement | string | A simple string the statement should start with or a valid regular expression. Regular expressions must contain delimiters. |
$message | string | An optional message to override the default one. |
public assertQueriesCountByStatementAndAction ( integer $n, string $statement, string $action, string $message = '' ) | ||
$n | integer | The expected number of queries. |
$statement | string | A simple string the statement should start with or a valid regular expression. Regular expressions must contain delimiters. |
$action | string | The action name, e.g. 'init'. |
$message | string | An optional message to override the default one. |
public assertQueriesCountByStatementAndFilter ( integer $n, string $statement, string $filter, string $message = '' ) | ||
$n | integer | The expected number of queries. |
$statement | string | A simple string the statement should start with or a valid regular expression. Regular expressions must contain delimiters. |
$filter | string | The filter name, e.g. 'posts_where'. |
$message | string | An optional message to override the default one. |
public assertQueriesCountByStatementAndFunction ( integer $n, string $statement, string $function, string $message = '' ) | ||
$n | integer | The expected number of queries. |
$statement | string | A simple string the statement should start with or a valid regular expression. Regular expressions must contain delimiters. |
$function | string | |
$message | string | An optional message to override the default one. |
public assertQueriesCountByStatementAndMethod ( integer $n, string $statement, string $class, string $method, string $message = '' ) | ||
$n | integer | The expected number of queries. |
$statement | string | A simple string the statement should start with or a valid regular expression. Regular expressions must contain delimiters. |
$class | string | |
$method | string | |
$message | string | An optional message to override the default one. |