AcControllerResourceTest::testBuildCollectionWhenOnIndexAction PHP Method

testBuildCollectionWhenOnIndexAction() public method

Should build a collection when on index action
    public function testBuildCollectionWhenOnIndexAction()
    {
        $project = $this->mock('Project');
        $project->shouldReceive('get')->once()->andReturn("found_projects");
        $this->params['action'] = "index";
        $resource = new Efficiently\AuthorityController\ControllerResource($this->controller, 'project');
        $resource->loadResource();
        $this->assertNull($this->getProperty($this->controller, 'project'));
        $this->assertEquals($this->getProperty($this->controller, 'projects'), "found_projects");
    }
AcControllerResourceTest