Skip to content

Commit 2d7f931

Browse files
committed
Test Autoloader package instances
1 parent 958ff8e commit 2d7f931

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

tests/system/Config/ServicesTest.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,30 @@ public function tearDown()
2222
$_SERVER = $this->original;
2323
}
2424

25+
public function testNewAutoloader()
26+
{
27+
$actual = Services::autoloader();
28+
$this->assertInstanceOf(\CodeIgniter\Autoloader\Autoloader::class, $actual);
29+
}
30+
31+
public function testNewUnsharedAutoloader()
32+
{
33+
$actual = Services::autoloader(false);
34+
$this->assertInstanceOf(\CodeIgniter\Autoloader\Autoloader::class, $actual);
35+
}
36+
37+
public function testNewFileLocator()
38+
{
39+
$actual = Services::locator();
40+
$this->assertInstanceOf(\CodeIgniter\Autoloader\FileLocator::class, $actual);
41+
}
42+
43+
public function testNewUnsharedFileLocator()
44+
{
45+
$actual = Services::locator(false);
46+
$this->assertInstanceOf(\CodeIgniter\Autoloader\FileLocator::class, $actual);
47+
}
48+
2549
public function testNewCurlRequest()
2650
{
2751
$actual = Services::curlrequest();

0 commit comments

Comments
 (0)