mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Fix tests
This commit is contained in:
parent
64548138ba
commit
2b22b98c69
@ -93,6 +93,11 @@ class DatabaseConfig extends \CodeIgniter\Test\CIUnitTestCase
|
||||
'failover' => [],
|
||||
];
|
||||
|
||||
protected function tearDown(): void
|
||||
{
|
||||
$this->setPrivateProperty(Config::class, 'instances', []);
|
||||
}
|
||||
|
||||
public function testConnectionGroup()
|
||||
{
|
||||
$conn = Config::connect($this->group, false);
|
||||
@ -175,10 +180,4 @@ class DatabaseConfig extends \CodeIgniter\Test\CIUnitTestCase
|
||||
$this->assertEquals([], $this->getPrivateProperty($conn, 'failover'));
|
||||
}
|
||||
|
||||
public function testConnectionInstances()
|
||||
{
|
||||
$this->assertEquals(4, count(Config::getConnections()));
|
||||
$this->setPrivateProperty(Config::class, 'instances', []);
|
||||
$this->assertEquals(0, count(Config::getConnections()));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user