‪TYPO3CMS  10.4
InputButtonTest.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 
20 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
21 
25 class ‪InputButtonTest extends UnitTestCase
26 {
33  {
34  $button = new ‪InputButton();
35  $isValid = $button->isValid();
36  self::assertFalse($isValid);
37  }
38 
45  {
46  $button = new ‪InputButton();
47  $button->setName('husel')->setValue('1')->setTitle('huhu');
48  $isValid = $button->isValid();
49  self::assertFalse($isValid);
50  }
51 
58  {
59  $button = new ‪InputButton();
60  $icon = new ‪Icon();
61  $button->setName('husel')->setValue('1')->setIcon($icon);
62  $isValid = $button->isValid();
63  self::assertFalse($isValid);
64  }
65 
72  {
73  $button = new ‪InputButton();
74  $icon = new ‪Icon();
75  $button->setTitle('husel')->setValue('1')->setIcon($icon);
76  $isValid = $button->isValid();
77  self::assertFalse($isValid);
78  }
79 
86  {
87  $button = new ‪InputButton();
88  $icon = new ‪Icon();
89  $button->setTitle('husel')->setName('husel')->setIcon($icon);
90  $isValid = $button->isValid();
91  self::assertFalse($isValid);
92  }
93 
100  {
101  $button = new ‪InputButton();
102  $icon = new ‪Icon();
103  $button->setTitle('husel')->setName('husel')->setIcon($icon)->setValue('1');
104  $isValid = $button->isValid();
105  self::assertTrue($isValid);
106  }
107 }
‪TYPO3\CMS\Backend\Tests\Unit\Template\Components\Button\InputButtonTest\isButtonValidOmittedValueExpectFalse
‪isButtonValidOmittedValueExpectFalse()
Definition: InputButtonTest.php:85
‪TYPO3\CMS\Backend\Tests\Unit\Template\Components\Button\InputButtonTest\isButtonValidOmittedNameExpectFalse
‪isButtonValidOmittedNameExpectFalse()
Definition: InputButtonTest.php:71
‪TYPO3\CMS\Core\Imaging\Icon
Definition: Icon.php:26
‪TYPO3\CMS\Backend\Tests\Unit\Template\Components\Button\InputButtonTest
Definition: InputButtonTest.php:26
‪TYPO3\CMS\Backend\Tests\Unit\Template\Components\Button\InputButtonTest\isButtonValidAllValuesSetExpectTrue
‪isButtonValidAllValuesSetExpectTrue()
Definition: InputButtonTest.php:99
‪TYPO3\CMS\Backend\Tests\Unit\Template\Components\Button
Definition: FullyRenderedButtonTest.php:16
‪TYPO3\CMS\Backend\Tests\Unit\Template\Components\Button\InputButtonTest\isButtonValidOmittedTitleExpectFalse
‪isButtonValidOmittedTitleExpectFalse()
Definition: InputButtonTest.php:57
‪TYPO3\CMS\Backend\Tests\Unit\Template\Components\Button\InputButtonTest\isButtonValidBlankCallExpectFalse
‪isButtonValidBlankCallExpectFalse()
Definition: InputButtonTest.php:32
‪TYPO3\CMS\Backend\Template\Components\Buttons\InputButton
Definition: InputButton.php:38
‪TYPO3\CMS\Backend\Tests\Unit\Template\Components\Button\InputButtonTest\isButtonValidOmittedIconExpectFalse
‪isButtonValidOmittedIconExpectFalse()
Definition: InputButtonTest.php:44