‪TYPO3CMS  10.4
BaseViewHelperTest.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
19 use TYPO3\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
20 
21 class ‪BaseViewHelperTest extends ViewHelperBaseTestcase
22 {
27  {
28  $baseUri = 'http://typo3.org/';
29  $this->request->getBaseUri()->willReturn($baseUri);
30  $viewHelper = new ‪BaseViewHelper();
31  $this->injectDependenciesIntoViewHelper($viewHelper);
32  $expectedResult = '<base href="' . $baseUri . '" />';
33  $actualResult = $viewHelper->render();
34  self::assertSame($expectedResult, $actualResult);
35  }
36 }
‪TYPO3\CMS\Fluid\ViewHelpers\BaseViewHelper
Definition: BaseViewHelper.php:41
‪TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\BaseViewHelperTest\renderTakesBaseUriFromControllerContext
‪renderTakesBaseUriFromControllerContext()
Definition: BaseViewHelperTest.php:26
‪TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers
‪TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\BaseViewHelperTest
Definition: BaseViewHelperTest.php:22