From 28d2b76c9bdf8a890379c6451fb61ade2c9b9e4a Mon Sep 17 00:00:00 2001 From: Torsten Landsiedel Date: Thu, 13 Jun 2024 15:19:14 +0200 Subject: [PATCH] Add additional tests to show the value is not modified --- tests/WP_SQLite_Translator_Tests.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/WP_SQLite_Translator_Tests.php b/tests/WP_SQLite_Translator_Tests.php index 43a68d1..f7821d4 100644 --- a/tests/WP_SQLite_Translator_Tests.php +++ b/tests/WP_SQLite_Translator_Tests.php @@ -128,6 +128,11 @@ public function testRegexpReplace() { $this->assertQuery( "SELECT * FROM _options WHERE REGEXP_REPLACE(option_name, '(-ignore|-remove)', '') = 'test'" ); $this->assertCount( 2, $this->engine->get_query_results() ); + + $result1 = $this->engine->query( "SELECT option_value FROM _options WHERE option_name='test-ignore';" ); + $result2 = $this->engine->query( "SELECT option_value FROM _options WHERE option_name='test-remove';" ); + $this->assertEquals( '1', $result1[0]->option_value ); + $this->assertEquals( '2', $result2[0]->option_value ); } public function testInsertDateNow() {