public function test_throws_exception_if_display_is_not_set_in_config() { $this->setExpectedException('Anavel\\Crud\\Abstractor\\Exceptions\\RelationException', 'Display should be set in config'); $this->sut = new Select($this->wrongConfig['Users']['relations']['group'], $this->modelManagerMock = Mockery::mock('ANavallaSuiza\\Laravel\\Database\\Contracts\\Manager\\ModelManager'), $user = new User(), $user->group(), $this->fieldMock); }
public function test_throws_exception_if_name_is_not_set_in_config() { $this->setExpectedException('Anavel\\Crud\\Abstractor\\Exceptions\\RelationException', 'Relation name should be set'); $this->sut = new SelectMultipleManyToMany($this->wrongConfig['Users']['relations']['relation-without-name'], $this->modelManagerMock = Mockery::mock('ANavallaSuiza\\Laravel\\Database\\Contracts\\Manager\\ModelManager'), $user = new User(), $user->roles(), $this->fieldMock); }