Skip to content

Commit

Permalink
Fixing unit test - third attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
Zodiac1978 committed Jun 13, 2024
1 parent 7ff5035 commit 05d20b2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/WP_SQLite_Translator_Tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ public static function regexpOperators() {

public function testRegexpReplace() {
$this->assertQuery(
"INSERT INTO _options (option_name, option_value) VALUES ('first', 'test');"
"INSERT INTO _options (option_name, option_value) VALUES ('test-ignore', '1');"
);
$this->assertQuery(
"INSERT INTO _options (option_name, option_value) VALUES ('second', 'ignore test');"
"INSERT INTO _options (option_name, option_value) VALUES ('test-remove', '2');"
);

$this->assertQuery( "SELECT FROM _options WHERE REGEXP_REPLACE(option_value, 'ignore ', '') = 'test'" );
$this->assertQuery( "SELECT * FROM _options WHERE REGEXP_REPLACE(option_name, '(-ignore|-remove)', '') = 'test'" );
$this->assertCount( 2, $this->engine->get_query_results() );
}

Expand Down

0 comments on commit 05d20b2

Please sign in to comment.