TYPO3 CMS  TYPO3_7-6
ArgumentDefinitionTest.php
Go to the documentation of this file.
1 <?php
3 
4 /* *
5  * This script is backported from the TYPO3 Flow package "TYPO3.Fluid". *
6  * *
7  * It is free software; you can redistribute it and/or modify it under *
8  * the terms of the GNU Lesser General Public License, either version 3 *
9  * of the License, or (at your option) any later version. *
10  * *
11  * The TYPO3 project - inspiring people to share! *
12  * */
13 
18 {
22  public function objectStoresDataCorrectly()
23  {
24  $name = 'This is a name';
25  $description = 'Example desc';
26  $type = 'string';
27  $isRequired = true;
28  $isMethodParameter = true;
29  $argumentDefinition = new \TYPO3\CMS\Fluid\Core\ViewHelper\ArgumentDefinition($name, $type, $description, $isRequired, null, $isMethodParameter);
30 
31  $this->assertEquals($argumentDefinition->getName(), $name, 'Name could not be retrieved correctly.');
32  $this->assertEquals($argumentDefinition->getDescription(), $description, 'Description could not be retrieved correctly.');
33  $this->assertEquals($argumentDefinition->getType(), $type, 'Type could not be retrieved correctly');
34  $this->assertEquals($argumentDefinition->isRequired(), $isRequired, 'Required flag could not be retrieved correctly.');
35  $this->assertEquals($argumentDefinition->isMethodParameter(), $isMethodParameter, 'isMethodParameter flag could not be retrieved correctly.');
36  }
37 }