AcControllerResourceTest::testShouldBuildRecordThroughHasOneAssociationWithSingletonAndShallowOptions PHP Метод

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

Should build record through hasOne association with 'singleton' and 'shallow' options
    public function testShouldBuildRecordThroughHasOneAssociationWithSingletonAndShallowOptions()
    {
        $this->buildModel('Project');
        $this->params = array_merge($this->params, array_merge(['action' => 'store', 'project' => ['name' => 'foobar']]));
        $resource = new Efficiently\AuthorityController\ControllerResource($this->controller, ['through' => 'category', 'singleton' => true, 'shallow' => true]);
        $resource->loadResource();
        $this->assertEquals($this->getProperty($this->controller, 'project')->name, 'foobar');
    }
AcControllerResourceTest