Crud\TestCase\Controller\Crud\CrudComponentTest::testControllerWithEmptyUses PHP Method

testControllerWithEmptyUses() public method

Test the Crud sets model and modelClass to NULL if there is no model defined in the controller
public testControllerWithEmptyUses ( ) : void
return void
    public function testControllerWithEmptyUses()
    {
        $this->Crud = new CrudComponent($this->Registry, ['actions' => ['index']]);
        $this->Crud->beforeFilter(new Event('Controller.beforeFilter'));
        $this->controller->Crud = $this->Crud;
        $this->Crud->config('actions.index', ['className' => 'Crud.Index']);
        $this->Crud->action('index');
        $subject = $this->Crud->trigger('sample');
        $this->assertNull($subject->model);
        $this->assertNull($subject->modelClass);
    }