‪TYPO3CMS  10.4
EmailViewHelperTest.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 
24 class ‪EmailViewHelperTest extends ViewHelperBaseTestcase
25 {
29  protected ‪$viewHelper;
30 
31  protected function ‪setUp(): void
32  {
33  parent::setUp();
34  $this->viewHelper = new ‪EmailViewHelper();
35  $this->injectDependenciesIntoViewHelper($this->viewHelper);
36  }
37 
42  {
43  $this->setArgumentsUnderTest(
44  $this->viewHelper,
45  [
46  'email' => 'some@email.tld'
47  ]
48  );
49  $actualResult = $this->viewHelper->initializeArgumentsAndRender();
50 
51  self::assertEquals('mailto:some@email.tld', $actualResult);
52  }
53 }
‪TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Uri
Definition: EmailViewHelperTest.php:16
‪TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Uri\EmailViewHelperTest\setUp
‪setUp()
Definition: EmailViewHelperTest.php:30
‪TYPO3\CMS\Fluid\ViewHelpers\Uri\EmailViewHelper
Definition: EmailViewHelper.php:42
‪TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Uri\EmailViewHelperTest\$viewHelper
‪TYPO3 CMS Fluid ViewHelpers Uri EmailViewHelper $viewHelper
Definition: EmailViewHelperTest.php:28
‪TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Uri\EmailViewHelperTest
Definition: EmailViewHelperTest.php:25
‪TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Uri\EmailViewHelperTest\renderReturnsFirstResultOfGetMailTo
‪renderReturnsFirstResultOfGetMailTo()
Definition: EmailViewHelperTest.php:40