You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
576 B
30 lines
576 B
<?php
|
|
|
|
namespace TestConfig;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use Config\Autoload;
|
|
use RuntimeException;
|
|
|
|
class AutoloadTest extends TestCase
|
|
{
|
|
public function testCharger()
|
|
{
|
|
$this->expectException(RuntimeException::class);
|
|
$this->expectExceptionMessage('Config\Autoload is already started');
|
|
|
|
Autoload::charger();
|
|
Autoload::charger();
|
|
}
|
|
|
|
public function testShutDown()
|
|
{
|
|
Autoload::shutDown();
|
|
Autoload::charger();
|
|
Autoload::shutDown();
|
|
|
|
$this->assertNull(Autoload::getInstance());
|
|
}
|
|
}
|
|
|