AcControllerResourceTest::testCreateThroughNamespacedParams PHP Метод

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

Should store through the namespaced params
    public function testCreateThroughNamespacedParams()
    {
        // namespace MyEngine;
        // class Project extends \Project {}
        $projectAttributes = ['id' => 2];
        $project = $this->buildModel('MyEngine\\Project', $projectAttributes);
        $actionParams = ['my_engine_project' => ['name' => 'foobar']];
        $this->params = array_merge($this->params, array_merge(['controller' => 'MyEngine\\ProjectsController', 'action' => 'store'], $actionParams));
        $resource = new Efficiently\AuthorityController\ControllerResource($this->controller);
        $resource->loadResource();
        $this->assertEquals($this->getProperty($this->controller, 'project')->name, "foobar");
    }
AcControllerResourceTest