Skip to content

Commit cce2531

Browse files
committed
test: fix failed test
There was 1 failure: 1) CodeIgniter\Database\Migrations\MigrationRunnerTest::testLoadsDefaultDatabaseWhenNoneSpecified Failed asserting that two strings are identical. --- Expected +++ Actual @@ @@ -'.../CodeIgniter4/writable/:memory:' +':memory:' .../CodeIgniter4/tests/system/Database/Migrations/MigrationRunnerTest.php:84
1 parent 4a6fecb commit cce2531

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/system/Database/Migrations/MigrationRunnerTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,13 @@ public function testLoadsDefaultDatabaseWhenNoneSpecified()
7979
$db = $this->getPrivateProperty($runner, 'db');
8080

8181
$this->assertInstanceOf(BaseConnection::class, $db);
82+
$database = (
83+
$dbConfig->tests['DBDriver'] === 'SQLite3'
84+
&& $dbConfig->tests['database'] !== ':memory:'
85+
? WRITEPATH : ''
86+
) . $dbConfig->tests['database'];
8287
$this->assertSame(
83-
($dbConfig->tests['DBDriver'] === 'SQLite3' ? WRITEPATH : '') . $dbConfig->tests['database'],
88+
$database,
8489
$this->getPrivateProperty($db, 'database')
8590
);
8691
$this->assertSame($dbConfig->tests['DBDriver'], $this->getPrivateProperty($db, 'DBDriver'));

0 commit comments

Comments
 (0)