45 $this->templateVariableContainer = $this->getMock(
'TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TemplateVariableContainer', array(
'exists',
'remove',
'add'));
46 $this->viewHelperVariableContainer = $this->getMock(
'TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\ViewHelperVariableContainer', array(
'setView'));
47 $this->renderingContext = $this->getMock(
'TYPO3\\CMS\\Fluid\\Core\\Rendering\\RenderingContext', array(
'getViewHelperVariableContainer',
'getTemplateVariableContainer'));
48 $this->renderingContext->expects($this->any())->method(
'getViewHelperVariableContainer')->will($this->returnValue($this->viewHelperVariableContainer));
49 $this->renderingContext->expects($this->any())->method(
'getTemplateVariableContainer')->will($this->returnValue($this->templateVariableContainer));
50 $this->view = $this->getMock(
'TYPO3\\CMS\\Fluid\\View\\AbstractTemplateView', array(
'getTemplateSource',
'getLayoutSource',
'getPartialSource',
'canRender',
'getTemplateIdentifier',
'getLayoutIdentifier',
'getPartialIdentifier'));
51 $this->view->setRenderingContext($this->renderingContext);
58 $this->viewHelperVariableContainer->expects($this->once())->method(
'setView')->with($this->view);
59 $this->view->setRenderingContext($this->renderingContext);
66 $this->templateVariableContainer->expects($this->at(0))->method(
'exists')->with(
'foo')->will($this->returnValue(FALSE));
67 $this->templateVariableContainer->expects($this->at(1))->method(
'add')->with(
'foo',
'FooValue');
68 $this->templateVariableContainer->expects($this->at(2))->method(
'exists')->with(
'bar')->will($this->returnValue(FALSE));
69 $this->templateVariableContainer->expects($this->at(3))->method(
'add')->with(
'bar',
'BarValue');
72 ->assign(
'foo',
'FooValue')
73 ->assign(
'bar',
'BarValue');
80 $this->templateVariableContainer->expects($this->at(0))->method(
'exists')->with(
'foo')->will($this->returnValue(FALSE));
81 $this->templateVariableContainer->expects($this->at(1))->method(
'add')->with(
'foo',
'FooValue');
82 $this->templateVariableContainer->expects($this->at(2))->method(
'exists')->with(
'foo')->will($this->returnValue(TRUE));
83 $this->templateVariableContainer->expects($this->at(3))->method(
'remove')->with(
'foo');
84 $this->templateVariableContainer->expects($this->at(4))->method(
'add')->with(
'foo',
'FooValueOverridden');
86 $this->view->assign(
'foo',
'FooValue');
87 $this->view->assign(
'foo',
'FooValueOverridden');
94 $this->templateVariableContainer->expects($this->at(0))->method(
'exists')->with(
'foo')->will($this->returnValue(FALSE));
95 $this->templateVariableContainer->expects($this->at(1))->method(
'add')->with(
'foo',
'FooValue');
96 $this->templateVariableContainer->expects($this->at(2))->method(
'exists')->with(
'bar')->will($this->returnValue(FALSE));
97 $this->templateVariableContainer->expects($this->at(3))->method(
'add')->with(
'bar',
'BarValue');
98 $this->templateVariableContainer->expects($this->at(4))->method(
'exists')->with(
'baz')->will($this->returnValue(FALSE));
99 $this->templateVariableContainer->expects($this->at(5))->method(
'add')->with(
'baz',
'BazValue');
102 ->assignMultiple(array(
'foo' =>
'FooValue',
'bar' =>
'BarValue'))
103 ->assignMultiple(array(
'baz' =>
'BazValue'));
110 $this->templateVariableContainer->expects($this->at(0))->method(
'exists')->with(
'foo')->will($this->returnValue(FALSE));
111 $this->templateVariableContainer->expects($this->at(1))->method(
'add')->with(
'foo',
'FooValue');
112 $this->templateVariableContainer->expects($this->at(2))->method(
'exists')->with(
'foo')->will($this->returnValue(TRUE));
113 $this->templateVariableContainer->expects($this->at(3))->method(
'remove')->with(
'foo');
114 $this->templateVariableContainer->expects($this->at(4))->method(
'add')->with(
'foo',
'FooValueOverridden');
115 $this->templateVariableContainer->expects($this->at(5))->method(
'exists')->with(
'bar')->will($this->returnValue(FALSE));
116 $this->templateVariableContainer->expects($this->at(6))->method(
'add')->with(
'bar',
'BarValue');
118 $this->view->assign(
'foo',
'FooValue');
119 $this->view->assignMultiple(array(
'foo' =>
'FooValueOverridden',
'bar' =>
'BarValue'));
$viewHelperVariableContainer
assignMultipleAddsValuesToTemplateVariableContainer()
assignMultipleCanOverridePreviouslyAssignedValues()
$templateVariableContainer
assignCanOverridePreviouslyAssignedValues()
viewIsPlacedInViewHelperVariableContainer()
assignAddsValueToTemplateVariableContainer()