Move validator methods

This commit is contained in:
Frederic Guillot
2016-01-14 20:18:13 -05:00
parent dc35a78374
commit 805be7d331
33 changed files with 605 additions and 477 deletions

View File

@@ -57,26 +57,4 @@ class GroupTest extends Base
$this->assertTrue($groupModel->remove(1));
$this->assertEmpty($groupModel->getById(1));
}
public function testValidateCreation()
{
$groupModel = new Group($this->container);
$result = $groupModel->validateCreation(array('name' => 'Test'));
$this->assertTrue($result[0]);
$result = $groupModel->validateCreation(array('name' => ''));
$this->assertFalse($result[0]);
}
public function testValidateModification()
{
$groupModel = new Group($this->container);
$result = $groupModel->validateModification(array('name' => 'Test', 'id' => 1));
$this->assertTrue($result[0]);
$result = $groupModel->validateModification(array('name' => 'Test'));
$this->assertFalse($result[0]);
}
}