‪TYPO3CMS  9.5
InputButtonTest.php
Go to the documentation of this file.
1 <?php
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 
19 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
20 
24 class ‪InputButtonTest extends UnitTestCase
25 {
32  {
33  $button = new ‪InputButton();
34  $isValid = $button->isValid();
35  $this->assertFalse($isValid);
36  }
37 
44  {
45  $button = new ‪InputButton();
46  $button->setName('husel')->setValue('1')->setTitle('huhu');
47  $isValid = $button->isValid();
48  $this->assertFalse($isValid);
49  }
50 
57  {
58  $button = new ‪InputButton();
59  $icon = new ‪Icon();
60  $button->setName('husel')->setValue('1')->setIcon($icon);
61  $isValid = $button->isValid();
62  $this->assertFalse($isValid);
63  }
64 
71  {
72  $button = new ‪InputButton();
73  $icon = new ‪Icon();
74  $button->setTitle('husel')->setValue('1')->setIcon($icon);
75  $isValid = $button->isValid();
76  $this->assertFalse($isValid);
77  }
78 
85  {
86  $button = new ‪InputButton();
87  $icon = new ‪Icon();
88  $button->setTitle('husel')->setName('husel')->setIcon($icon);
89  $isValid = $button->isValid();
90  $this->assertFalse($isValid);
91  }
92 
99  {
100  $button = new ‪InputButton();
101  $icon = new ‪Icon();
102  $button->setTitle('husel')->setName('husel')->setIcon($icon)->setValue('1');
103  $isValid = $button->isValid();
104  $this->assertTrue($isValid);
105  }
106 }
‪TYPO3\CMS\Backend\Tests\Unit\Template\Components\Button\InputButtonTest\isButtonValidOmittedValueExpectFalse
‪isButtonValidOmittedValueExpectFalse()
Definition: InputButtonTest.php:84
‪TYPO3\CMS\Backend\Tests\Unit\Template\Components\Button\InputButtonTest\isButtonValidOmittedNameExpectFalse
‪isButtonValidOmittedNameExpectFalse()
Definition: InputButtonTest.php:70
‪TYPO3\CMS\Core\Imaging\Icon
Definition: Icon.php:25
‪TYPO3\CMS\Backend\Tests\Unit\Template\Components\Button\InputButtonTest
Definition: InputButtonTest.php:25
‪TYPO3\CMS\Backend\Tests\Unit\Template\Components\Button\InputButtonTest\isButtonValidAllValuesSetExpectTrue
‪isButtonValidAllValuesSetExpectTrue()
Definition: InputButtonTest.php:98
‪TYPO3\CMS\Backend\Tests\Unit\Template\Components\Button
Definition: FullyRenderedButtonTest.php:2
‪TYPO3\CMS\Backend\Tests\Unit\Template\Components\Button\InputButtonTest\isButtonValidOmittedTitleExpectFalse
‪isButtonValidOmittedTitleExpectFalse()
Definition: InputButtonTest.php:56
‪TYPO3\CMS\Backend\Tests\Unit\Template\Components\Button\InputButtonTest\isButtonValidBlankCallExpectFalse
‪isButtonValidBlankCallExpectFalse()
Definition: InputButtonTest.php:31
‪TYPO3\CMS\Backend\Template\Components\Buttons\InputButton
Definition: InputButton.php:37
‪TYPO3\CMS\Backend\Tests\Unit\Template\Components\Button\InputButtonTest\isButtonValidOmittedIconExpectFalse
‪isButtonValidOmittedIconExpectFalse()
Definition: InputButtonTest.php:43