AcControllerResourceTest::testBuildNewResourceForNamespacedControllerAndNamespacedModelWithAssociativeArrayIfParamIdIsNotSpecified PHP Метод

testBuildNewResourceForNamespacedControllerAndNamespacedModelWithAssociativeArrayIfParamIdIsNotSpecified() публичный Метод

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