diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-01-11 22:07:39 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-01-11 22:07:39 -0500 |
commit | 3699073371acc66ccacb56a89e87147a9c90d8c4 (patch) | |
tree | c21c55936e472655aaa5aca3a976a2d02a0ed63a /tests/units/Model | |
parent | e31185a2bd85d7d8e16a614cb21dfdbff10ce070 (diff) |
Move project validator methods
Diffstat (limited to 'tests/units/Model')
-rw-r--r-- | tests/units/Model/ProjectTest.php | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/tests/units/Model/ProjectTest.php b/tests/units/Model/ProjectTest.php index 4d8e6fc7..990cee5a 100644 --- a/tests/units/Model/ProjectTest.php +++ b/tests/units/Model/ProjectTest.php @@ -277,30 +277,5 @@ class ProjectTest extends Base $project = $p->getByIdentifier(''); $this->assertFalse($project); - - // Validation rules - $r = $p->validateCreation(array('name' => 'test', 'identifier' => 'TEST1')); - $this->assertFalse($r[0]); - - $r = $p->validateCreation(array('name' => 'test', 'identifier' => 'test1')); - $this->assertFalse($r[0]); - - $r = $p->validateModification(array('id' => 1, 'name' => 'test', 'identifier' => 'TEST1')); - $this->assertTrue($r[0]); - - $r = $p->validateModification(array('id' => 1, 'name' => 'test', 'identifier' => 'test3')); - $this->assertTrue($r[0]); - - $r = $p->validateModification(array('id' => 1, 'name' => 'test', 'identifier' => '')); - $this->assertTrue($r[0]); - - $r = $p->validateModification(array('id' => 1, 'name' => 'test', 'identifier' => 'TEST2')); - $this->assertFalse($r[0]); - - $r = $p->validateCreation(array('name' => 'test', 'identifier' => 'a-b-c')); - $this->assertFalse($r[0]); - - $r = $p->validateCreation(array('name' => 'test', 'identifier' => 'test 123')); - $this->assertFalse($r[0]); } } |