AcControllerResourceTest::testShouldBuildAResourceWhenOnCustomCreateActionEvenWhenParamsIdExists PHP Метод

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

Should build a resource when on custom create action even when $this->params['id'] exists
    public function testShouldBuildAResourceWhenOnCustomCreateActionEvenWhenParamsIdExists()
    {
        $this->params = array_merge($this->params, array_merge(['action' => 'build', 'id' => '123']));
        $project = $this->mock('Project');
        $project->shouldReceive('__toString')->once()->andReturn("some_project");
        $resource = new Efficiently\AuthorityController\ControllerResource($this->controller, ['create' => 'build']);
        $resource->loadResource();
        $this->assertEquals($this->getProperty($this->controller, 'project'), 'some_project');
    }
AcControllerResourceTest