Illuminate\Routing\AcParametersTest::testResolveActionAndControllerNamesFromRequest PHP Method

testResolveActionAndControllerNamesFromRequest() public method

    public function testResolveActionAndControllerNamesFromRequest()
    {
        $input = ['project' => ['name' => 'foo']];
        $parameters = $this->parameters;
        $controller = $this->mockController();
        $this->call('POST', '/projects', $input);
        // store action
        $this->assertArrayHasKey('action', $this->getProperty($parameters, 'params'));
        $this->assertEquals($this->getProperty($parameters, 'params')['action'], 'store');
        $this->assertArrayHasKey('controller', $this->getProperty($parameters, 'params'));
        $this->assertEquals($this->getProperty($parameters, 'params')['controller'], 'projects');
        $this->assertArrayHasKey('action', $this->getProperty($controller, 'params'));
        $this->assertEquals($this->getProperty($controller, 'params')['action'], 'store');
        $this->assertArrayHasKey('controller', $this->getProperty($controller, 'params'));
        $this->assertEquals($this->getProperty($controller, 'params')['controller'], 'projects');
    }