Raised Extbase and Fluid to version 1.3.0
[Packages/TYPO3.CMS.git] / typo3 / sysext / fluid / Tests / Unit / ViewHelpers / BaseViewHelperTest.php
1 <?php
2
3 /* *
4 * This script belongs to the FLOW3 package "Fluid". *
5 * *
6 * It is free software; you can redistribute it and/or modify it under *
7 * the terms of the GNU General Public License as published by the Free *
8 * Software Foundation, either version 3 of the License, or (at your *
9 * option) any later version. *
10 * *
11 * This script is distributed in the hope that it will be useful, but *
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- *
13 * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
14 * Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with the script. *
18 * If not, see http://www.gnu.org/licenses/gpl.html *
19 * *
20 * The TYPO3 project - inspiring people to share! *
21 * */
22
23 require_once(dirname(__FILE__) . '/ViewHelperBaseTestcase.php');
24 /**
25 */
26 class Tx_Fluid_Tests_Unit_ViewHelpers_BaseViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase {
27 /**
28 * @test
29 * @author Sebastian Kurf├╝rst <sebastian@typo3.org>
30 */
31 public function renderTakesBaseUriFromControllerContext() {
32 $baseUri = 'http://typo3.org/';
33
34 $this->request->expects($this->any())->method('getBaseUri')->will($this->returnValue($baseUri));
35
36 $viewHelper = new Tx_Fluid_ViewHelpers_BaseViewHelper();
37 $this->injectDependenciesIntoViewHelper($viewHelper);
38
39 $expectedResult = '<base href="' . $baseUri . '" />';
40 $actualResult = $viewHelper->render();
41 $this->assertSame($expectedResult, $actualResult);
42 }
43 }
44 ?>