SebastiaanLuca\Router\Tests\KernelTest::testItResetsTheLocalRouter PHP Method

testItResetsTheLocalRouter() public method

    public function testItResetsTheLocalRouter()
    {
        $kernel = $this->createKernel();
        $property = $this->enablePublicAccessOfProperty($kernel, 'router');
        // The router we're using as replacement
        $router = $this->mock(ExtendedRouter::class, [null => null]);
        // Bind our mocked router into the IoC
        $this->app->instance('router', $router);
        // Kick-off
        $kernel->dispatchToRouter();
        // Local router should now equal our mocked router instead
        // of the one we used when instantiating the class
        $this->assertEquals($router, $property->getValue($kernel));
    }