@@ -16,12 +16,12 @@ public function __construct( $arg1 = null, $arg2 = null ) {
1616 }
1717}
1818
19- class WP_PDO_MySQL_On_SQLite_PDO_API_Tests extends TestCase {
20- /** @var WP_PDO_MySQL_On_SQLite */
19+ class WP_MySQL_On_SQLite_PDO_API_Tests extends TestCase {
20+ /** @var WP_MySQL_On_SQLite */
2121 private $ driver ;
2222
2323 public function setUp (): void {
24- $ this ->driver = new WP_PDO_MySQL_On_SQLite ( 'mysql-on-sqlite:path=:memory:;dbname=wp; ' );
24+ $ this ->driver = new WP_MySQL_On_SQLite ( 'mysql-on-sqlite:path=:memory:;dbname=wp; ' );
2525
2626 // Run all tests with stringified fetch mode results, so we can use
2727 // assertions that are consistent across all tested PHP versions.
@@ -30,41 +30,41 @@ public function setUp(): void {
3030 }
3131
3232 public function test_connection (): void {
33- $ driver = new WP_PDO_MySQL_On_SQLite ( 'mysql-on-sqlite:path=:memory:;dbname=WordPress; ' );
33+ $ driver = new WP_MySQL_On_SQLite ( 'mysql-on-sqlite:path=:memory:;dbname=WordPress; ' );
3434 $ this ->assertInstanceOf ( PDO ::class, $ driver );
3535 }
3636
3737 public function test_dsn_parsing (): void {
3838 // Standard DSN.
39- $ driver = new WP_PDO_MySQL_On_SQLite ( 'mysql-on-sqlite:path=:memory:;dbname=wp ' );
39+ $ driver = new WP_MySQL_On_SQLite ( 'mysql-on-sqlite:path=:memory:;dbname=wp ' );
4040 $ this ->assertSame ( 'wp ' , $ driver ->query ( 'SELECT DATABASE() ' )->fetch ()[0 ] );
4141
4242 // DSN with trailing semicolon.
43- $ driver = new WP_PDO_MySQL_On_SQLite ( 'mysql-on-sqlite:path=:memory:;dbname=wp; ' );
43+ $ driver = new WP_MySQL_On_SQLite ( 'mysql-on-sqlite:path=:memory:;dbname=wp; ' );
4444 $ this ->assertSame ( 'wp ' , $ driver ->query ( 'SELECT DATABASE() ' )->fetch ()[0 ] );
4545
4646 // DSN with whitespace before argument names.
47- $ driver = new WP_PDO_MySQL_On_SQLite ( "mysql-on-sqlite: path=:memory:; \n\r\t\v\fdbname=wp " );
47+ $ driver = new WP_MySQL_On_SQLite ( "mysql-on-sqlite: path=:memory:; \n\r\t\v\fdbname=wp " );
4848 $ this ->assertSame ( 'wp ' , $ driver ->query ( 'SELECT DATABASE() ' )->fetch ()[0 ] );
4949
5050 // DSN with whitespace in the database name.
51- $ driver = new WP_PDO_MySQL_On_SQLite ( 'mysql-on-sqlite:path=:memory:;dbname= w p ' );
51+ $ driver = new WP_MySQL_On_SQLite ( 'mysql-on-sqlite:path=:memory:;dbname= w p ' );
5252 $ this ->assertSame ( ' w p ' , $ driver ->query ( 'SELECT DATABASE() ' )->fetch ()[0 ] );
5353
5454 // DSN with semicolon in the database name.
55- $ driver = new WP_PDO_MySQL_On_SQLite ( 'mysql-on-sqlite:path=:memory:;dbname=wp;dbname=w;;p; ' );
55+ $ driver = new WP_MySQL_On_SQLite ( 'mysql-on-sqlite:path=:memory:;dbname=wp;dbname=w;;p; ' );
5656 $ this ->assertSame ( 'w;p ' , $ driver ->query ( 'SELECT DATABASE() ' )->fetch ()[0 ] );
5757
5858 // DSN with semicolon in the database name and a terminating semicolon.
59- $ driver = new WP_PDO_MySQL_On_SQLite ( 'mysql-on-sqlite:path=:memory:;dbname=w;;;p ' );
59+ $ driver = new WP_MySQL_On_SQLite ( 'mysql-on-sqlite:path=:memory:;dbname=w;;;p ' );
6060 $ this ->assertSame ( 'w; ' , $ driver ->query ( 'SELECT DATABASE() ' )->fetch ()[0 ] );
6161
6262 // DSN with two semicolons in the database name.
63- $ driver = new WP_PDO_MySQL_On_SQLite ( 'mysql-on-sqlite:path=:memory:;dbname=w;;;;p ' );
63+ $ driver = new WP_MySQL_On_SQLite ( 'mysql-on-sqlite:path=:memory:;dbname=w;;;;p ' );
6464 $ this ->assertSame ( 'w;;p ' , $ driver ->query ( 'SELECT DATABASE() ' )->fetch ()[0 ] );
6565
6666 // DSN with a "\0" byte (always terminates the DSN string).
67- $ driver = new WP_PDO_MySQL_On_SQLite ( "mysql-on-sqlite:path=:memory:;dbname=w \0p; " );
67+ $ driver = new WP_MySQL_On_SQLite ( "mysql-on-sqlite:path=:memory:;dbname=w \0p; " );
6868 $ this ->assertSame ( 'w ' , $ driver ->query ( 'SELECT DATABASE() ' )->fetch ()[0 ] );
6969 }
7070
@@ -73,7 +73,7 @@ public function test_journal_mode_defaults_to_wal(): void {
7373 unlink ( $ path );
7474
7575 try {
76- $ driver = new WP_PDO_MySQL_On_SQLite ( 'mysql-on-sqlite:path= ' . $ path . ';dbname=wp ' );
76+ $ driver = new WP_MySQL_On_SQLite ( 'mysql-on-sqlite:path= ' . $ path . ';dbname=wp ' );
7777 $ connection = $ driver ->get_connection ();
7878 $ this ->assertSame (
7979 'wal ' ,
@@ -93,7 +93,7 @@ public function test_journal_mode_and_synchronous_driver_options(): void {
9393 unlink ( $ path );
9494
9595 try {
96- $ driver = new WP_PDO_MySQL_On_SQLite (
96+ $ driver = new WP_MySQL_On_SQLite (
9797 'mysql-on-sqlite:path= ' . $ path . ';dbname=wp ' ,
9898 null ,
9999 null ,
0 commit comments