Skip to content

Commit 9a2f512

Browse files
committed
test: fix setUp code
Properties are reset by PHPUnit, so $this->loaded in setUp() is always false.
1 parent e5721a4 commit 9a2f512

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/system/Database/DatabaseTestCaseTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
class DatabaseTestCaseTest extends CIDatabaseTestCase
77
{
8-
protected $loaded = false;
8+
protected static $loaded = false;
99

1010
/**
1111
* Should the db be refreshed before
@@ -41,10 +41,10 @@ class DatabaseTestCaseTest extends CIDatabaseTestCase
4141

4242
public function setUp(): void
4343
{
44-
if (! $this->loaded)
44+
if (! self::$loaded)
4545
{
4646
Services::autoloader()->addNamespace('Tests\Support\MigrationTestMigrations', SUPPORTPATH . 'MigrationTestMigrations');
47-
$this->loaded = true;
47+
self::$loaded = true;
4848
}
4949

5050
parent::setUp();

0 commit comments

Comments
 (0)