Respect\Rest\RouterTest::testMagicConstructorCanCreateCallbackRoutesWithExtraParams PHP Method

testMagicConstructorCanCreateCallbackRoutesWithExtraParams() public method

    public function testMagicConstructorCanCreateCallbackRoutesWithExtraParams()
    {
        $router = new Router();
        $callbackRoute = $router->get('/', $target = function () {
        }, array('extra'));
        $concreteCallbackRoute = $router->callbackRoute('GET', '/', $target, array('extra'));
        $this->assertInstanceOf('Respect\\Rest\\Routes\\Callback', $callbackRoute, 'Returned result from a magic constructor in this case should return a Routes\\Callback');
        $this->assertContains('extra', $callbackRoute->arguments, 'The "extra" appended to the magic constructor should be present on the arguments list');
        $this->assertEquals($callbackRoute, $concreteCallbackRoute, 'The magic and concrete instances of Routes\\Callback should be equivalent');
    }