Illuminate\Routing\AcParametersTest::testExtractResourceIdFromRequestWithEditAction PHP Method

testExtractResourceIdFromRequestWithEditAction() public method

    public function testExtractResourceIdFromRequestWithEditAction()
    {
        $parameters = $this->parameters;
        $controllerName = "UsersController";
        Route::get('users/{id}/edit', ['as' => 'users.edit', 'uses' => 'UsersController@edit']);
        // edit action
        $controller = $this->mockController($controllerName);
        $this->call('GET', '/users/6/edit');
        // edit action
        $this->assertArrayHasKey('id', $this->getProperty($parameters, 'params'));
        $this->assertEquals($this->getProperty($parameters, 'params')['id'], '6');
        $this->assertArrayHasKey('id', $this->getProperty($controller, 'params'));
        $this->assertEquals($this->getProperty($controller, 'params')['id'], '6');
    }