@@ 70-80 (lines=11) @@ | ||
67 | $this->assertEquals(1, $this->object->getChildren()->count()); |
|
68 | } |
|
69 | ||
70 | public function testGetSetNodeTranslations() |
|
71 | { |
|
72 | $translations = new ArrayCollection(); |
|
73 | $translation = new NodeTranslation(); |
|
74 | $translations->add($translation); |
|
75 | $this->object->setNodeTranslations($translations); |
|
76 | ||
77 | $this->assertEquals(1, $this->object->getNodeTranslations(true)->count()); |
|
78 | $this->assertEquals($translations, $this->object->getNodeTranslations(true)); |
|
79 | $this->assertTrue($this->object->getNodeTranslations(true)->contains($translation)); |
|
80 | } |
|
81 | ||
82 | public function testGetNodeTranslationsWithOfflineNodes() |
|
83 | { |
|
@@ 82-94 (lines=13) @@ | ||
79 | $this->assertTrue($this->object->getNodeTranslations(true)->contains($translation)); |
|
80 | } |
|
81 | ||
82 | public function testGetNodeTranslationsWithOfflineNodes() |
|
83 | { |
|
84 | $translation1 = new NodeTranslation(); |
|
85 | $translation1->setOnline(true); |
|
86 | $this->object->addNodeTranslation($translation1); |
|
87 | ||
88 | $translation2 = new NodeTranslation(); |
|
89 | $translation2->setOnline(false); |
|
90 | $this->object->addNodeTranslation($translation2); |
|
91 | ||
92 | $this->assertEquals(2, $this->object->getNodeTranslations(true)->count()); |
|
93 | $this->assertEquals(1, $this->object->getNodeTranslations()->count()); |
|
94 | } |
|
95 | ||
96 | public function testGetNodeTranslation() |
|
97 | { |