/** * @test * @dataProvider linkedDataProvider */ public function itemsAreAddedToContainer($subject, $predicate, $object, $objectType, $language, $name, $expected) { $this->fixture->setArguments(['subject' => $subject, 'predicate' => $predicate, 'object' => $object, 'objectType' => $objectType, 'language' => $language, 'name' => $name]); $this->templateVariableContainer->expects($this->once())->method('remove')->with($name); $this->templateVariableContainer->expects($this->once())->method('add')->with($name)->will($this->returnValue('')); ObjectAccess::setProperty($this->fixture, 'templateVariableContainer', $this->templateVariableContainer, true); $this->fixture->render(); $this->markTestIncomplete('Todo'); }
/** * @test */ public function assignMultipleCanOverridePreviouslyAssignedValues() { $this->templateVariableContainer->expects($this->at(0))->method('exists')->with('foo')->will($this->returnValue(false)); $this->templateVariableContainer->expects($this->at(1))->method('add')->with('foo', 'FooValue'); $this->templateVariableContainer->expects($this->at(2))->method('exists')->with('foo')->will($this->returnValue(true)); $this->templateVariableContainer->expects($this->at(3))->method('remove')->with('foo'); $this->templateVariableContainer->expects($this->at(4))->method('add')->with('foo', 'FooValueOverridden'); $this->templateVariableContainer->expects($this->at(5))->method('exists')->with('bar')->will($this->returnValue(false)); $this->templateVariableContainer->expects($this->at(6))->method('add')->with('bar', 'BarValue'); $this->view->assign('foo', 'FooValue'); $this->view->assignMultiple(array('foo' => 'FooValueOverridden', 'bar' => 'BarValue')); }