AcControllerResourceTest::testLoadResourceWithSameNamespaceAsControllerWithBackslashedNamespace PHP Метод

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

Should attempt to load a resource with the same namespace as the controller when using '\' for namespace
    public function testLoadResourceWithSameNamespaceAsControllerWithBackslashedNamespace()
    {
        $projectAttributes = ['id' => 2];
        $project = $this->buildModel('MyEngine\\Project', $projectAttributes);
        $this->params = array_merge($this->params, ['controller' => 'MyEngine\\ProjectsController', 'action' => 'show', 'id' => $project->id]);
        $resource = new Efficiently\AuthorityController\ControllerResource($this->controller);
        $resource->loadResource();
        $this->assertEquals($this->getProperty($this->controller, 'project'), $project);
    }
AcControllerResourceTest