Skip to content

Commit

Permalink
Add tests for the SlowDBQuery sniff
Browse files Browse the repository at this point in the history
  • Loading branch information
dingo-d committed Sep 18, 2023
1 parent ca3f542 commit 535652b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions WordPress/Tests/DB/SlowDBQueryUnitTest.inc
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ $query = 'foo=bar&meta_key=foo&meta_value=bar';
if ( ! isset( $widget['params'][0] ) ) {
$widget['params'][0] = array();
}

$query = 'foo=bar&meta_key=&meta_value=bar';
$query = 'foo=bar&meta_key=foo&meta_value=';

$query = 'foo=bar&meta_key=&meta_value='; // OK.
2 changes: 2 additions & 0 deletions WordPress/Tests/DB/SlowDBQueryUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public function getWarningList() {
15 => 1,
16 => 1,
19 => 2,
25 => 1,
26 => 1,
);
}
}

0 comments on commit 535652b

Please sign in to comment.