added missing test from dispatcher refactor

pull/571/head
n0nag0n 10 months ago
parent d1584a8aeb
commit a1228a8492

@ -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();

Loading…
Cancel
Save