|
|
|
@ -11,6 +11,7 @@ use flight\Engine;
|
|
|
|
|
use flight\net\Request;
|
|
|
|
|
use flight\net\Response;
|
|
|
|
|
use flight\util\Collection;
|
|
|
|
|
use InvalidArgumentException;
|
|
|
|
|
use PDOException;
|
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
|
use tests\classes\Container;
|
|
|
|
@ -681,6 +682,14 @@ class EngineTest extends TestCase
|
|
|
|
|
$this->expectOutputString('before456before123OKafter123456after123');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function testContainerBadClass() {
|
|
|
|
|
$engine = new Engine();
|
|
|
|
|
|
|
|
|
|
$this->expectException(InvalidArgumentException::class);
|
|
|
|
|
$this->expectExceptionMessage("\$containerHandler must be of type callable or instance \\Psr\\Container\\ContainerInterface");
|
|
|
|
|
$engine->registerContainerHandler('BadClass');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function testContainerDice() {
|
|
|
|
|
$engine = new Engine();
|
|
|
|
|
$dice = new \Dice\Dice();
|
|
|
|
|