AcControllerResourceTest::testShouldLoadTheModelUsingACustomNamespacedClass PHP Метод

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

Should load the model using a custom namespaced class
    public function testShouldLoadTheModelUsingACustomNamespacedClass()
    {
        $projectAttributes = ['id' => 2];
        $project = $this->buildModel('\\Sub\\Project', $projectAttributes);
        $this->params = array_merge($this->params, array_merge(['action' => 'show', 'id' => $project->id]));
        $resource = new Efficiently\AuthorityController\ControllerResource($this->controller, ['class' => '\\Sub\\Project']);
        $resource->loadResource();
        $this->assertEquals($this->getProperty($this->controller, 'project'), $project);
    }
AcControllerResourceTest