2 namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers;
29 $this->subject = $this->getMock(AliasViewHelper::class, array(
'renderChildren'));
38 $this->templateVariableContainer->expects($this->at(0))->method(
'add')->with(
'someAlias',
'someValue');
39 $this->templateVariableContainer->expects($this->at(1))->method(
'remove')->with(
'someAlias');
40 $this->subject->render(array(
'someAlias' =>
'someValue'));
48 $this->templateVariableContainer->expects($this->at(0))->method(
'add')->with(
'someAlias',
'someValue');
49 $this->templateVariableContainer->expects($this->at(1))->method(
'add')->with(
'someOtherAlias',
'someOtherValue');
50 $this->templateVariableContainer->expects($this->at(2))->method(
'remove')->with(
'someAlias');
51 $this->templateVariableContainer->expects($this->at(3))->method(
'remove')->with(
'someOtherAlias');
52 $this->subject->render(array(
'someAlias' =>
'someValue',
'someOtherAlias' =>
'someOtherValue'));
60 $this->subject->expects($this->once())->method(
'renderChildren')->will($this->returnValue(
'foo'));
61 $this->templateVariableContainer->expects($this->never())->method(
'add');
62 $this->templateVariableContainer->expects($this->never())->method(
'remove');
63 $this->assertEquals(
'foo', $this->subject->render(array()));