‪TYPO3CMS  10.4
LinkButtonTest.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 ‪LinkButtonTest extends UnitTestCase
26 {
33  {
34  $button = new ‪LinkButton();
35  $isValid = $button->isValid();
36  self::assertFalse($isValid);
37  }
38 
45  {
46  $button = new ‪LinkButton();
47  $button->setHref('#')->setTitle('huhu');
48  $isValid = $button->isValid();
49  self::assertFalse($isValid);
50  }
51 
58  {
59  $button = new ‪LinkButton();
60  $icon = new ‪Icon();
61  $button->setHref('husel')->setIcon($icon);
62  $isValid = $button->isValid();
63  self::assertFalse($isValid);
64  }
65 
72  {
73  $button = new ‪LinkButton();
74  $icon = new ‪Icon();
75  $button->setTitle('husel')->setIcon($icon);
76  $isValid = $button->isValid();
77  self::assertFalse($isValid);
78  }
79 
86  {
87  $button = new ‪LinkButton();
88  $icon = new ‪Icon();
89  $button->setTitle('husel')->setHref('husel')->setIcon($icon);
90  $isValid = $button->isValid();
91  self::assertTrue($isValid);
92  }
93 }
‪TYPO3\CMS\Core\Imaging\Icon
Definition: Icon.php:26
‪TYPO3\CMS\Backend\Tests\Unit\Template\Components\Button
Definition: FullyRenderedButtonTest.php:16