AcControllerResourceTest::testShouldLoadACollectionResourceWhenOnCustomActionWithNoIdParam PHP Метод

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

// Should load a collection resource when on custom action with no id param
    public function testShouldLoadACollectionResourceWhenOnCustomActionWithNoIdParam()
    {
        $project = $this->mock('Project');
        $project->shouldReceive('get')->once()->andReturn("found_projects");
        $this->params['action'] = "sort";
        $resource = new Efficiently\AuthorityController\ControllerResource($this->controller);
        $resource->loadResource();
        $this->assertNull($this->getProperty($this->controller, 'project'));
        $this->assertEquals($this->getProperty($this->controller, 'projects'), 'found_projects');
    }
AcControllerResourceTest