AcControllerResourceTest::testBuildNewResourceNamespacedModelWithAssociativeArrayIfParamIdIsNotSpecified PHP Method

testBuildNewResourceNamespacedModelWithAssociativeArrayIfParamIdIsNotSpecified() public method

Should build a new resource for namespaced model with hash if params[:id] is not specified
    public function testBuildNewResourceNamespacedModelWithAssociativeArrayIfParamIdIsNotSpecified()
    {
        $this->buildModel('\\Sub\\Project');
        $this->params = array_merge($this->params, ['action' => 'store', 'sub_project' => ['name' => 'foobar']]);
        $resource = new Efficiently\AuthorityController\ControllerResource($this->controller, ['class' => '\\Sub\\Project']);
        $resource->loadResource();
        $this->assertEquals($this->getProperty($this->controller, 'project')->name, "foobar");
    }
AcControllerResourceTest