[BUGFIX] Wording 78169-IntroduceTranslationSourceFieldForTt_content.rst
[Packages/TYPO3.CMS.git] / typo3 / sysext / fluid / Tests / Unit / Core / ViewHelper / ArgumentDefinitionTest.php
1 <?php
2 namespace TYPO3\CMS\Fluid\Tests\Unit\Core\ViewHelper;
3
4 /*
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16
17 /**
18 * Test case
19 */
20 class ArgumentDefinitionTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
21 {
22 /**
23 * @test
24 */
25 public function objectStoresDataCorrectly()
26 {
27 $name = 'This is a name';
28 $description = 'Example desc';
29 $type = 'string';
30 $isRequired = true;
31 $isMethodParameter = true;
32 $argumentDefinition = new \TYPO3\CMS\Fluid\Core\ViewHelper\ArgumentDefinition($name, $type, $description, $isRequired, null, $isMethodParameter);
33
34 $this->assertEquals($argumentDefinition->getName(), $name, 'Name could not be retrieved correctly.');
35 $this->assertEquals($argumentDefinition->getDescription(), $description, 'Description could not be retrieved correctly.');
36 $this->assertEquals($argumentDefinition->getType(), $type, 'Type could not be retrieved correctly');
37 $this->assertEquals($argumentDefinition->isRequired(), $isRequired, 'Required flag could not be retrieved correctly.');
38 $this->assertEquals($argumentDefinition->isMethodParameter(), $isMethodParameter, 'isMethodParameter flag could not be retrieved correctly.');
39 }
40 }