summaryrefslogtreecommitdiff
path: root/tests/units/Model/LinkTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/units/Model/LinkTest.php')
-rw-r--r--tests/units/Model/LinkTest.php46
1 files changed, 0 insertions, 46 deletions
diff --git a/tests/units/Model/LinkTest.php b/tests/units/Model/LinkTest.php
index de9d843a..b102646d 100644
--- a/tests/units/Model/LinkTest.php
+++ b/tests/units/Model/LinkTest.php
@@ -124,50 +124,4 @@ class LinkTest extends Base
$this->assertArrayNotHasKey(0, $links);
$this->assertEquals('relates to', $links[1]);
}
-
- public function testValidateCreation()
- {
- $l = new Link($this->container);
-
- $r = $l->validateCreation(array('label' => 'a'));
- $this->assertTrue($r[0]);
-
- $r = $l->validateCreation(array('label' => 'a', 'opposite_label' => 'b'));
- $this->assertTrue($r[0]);
-
- $r = $l->validateCreation(array('label' => 'relates to'));
- $this->assertFalse($r[0]);
-
- $r = $l->validateCreation(array('label' => 'a', 'opposite_label' => 'a'));
- $this->assertFalse($r[0]);
-
- $r = $l->validateCreation(array('label' => ''));
- $this->assertFalse($r[0]);
- }
-
- public function testValidateModification()
- {
- $l = new Link($this->container);
-
- $r = $l->validateModification(array('id' => 20, 'label' => 'a', 'opposite_id' => 0));
- $this->assertTrue($r[0]);
-
- $r = $l->validateModification(array('id' => 20, 'label' => 'a', 'opposite_id' => '1'));
- $this->assertTrue($r[0]);
-
- $r = $l->validateModification(array('id' => 20, 'label' => 'relates to', 'opposite_id' => '1'));
- $this->assertFalse($r[0]);
-
- $r = $l->validateModification(array('id' => 20, 'label' => '', 'opposite_id' => '1'));
- $this->assertFalse($r[0]);
-
- $r = $l->validateModification(array('label' => '', 'opposite_id' => '1'));
- $this->assertFalse($r[0]);
-
- $r = $l->validateModification(array('id' => 20, 'opposite_id' => '1'));
- $this->assertFalse($r[0]);
-
- $r = $l->validateModification(array('label' => 'test'));
- $this->assertFalse($r[0]);
- }
}