‪TYPO3CMS  11.5
DimensionTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
22 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
23 
27 class ‪DimensionTest extends UnitTestCase
28 {
30  protected int ‪$width = 32;
31  protected int ‪$height = 32;
32 
36  protected function ‪setUp(): void
37  {
38  parent::setUp();
39  $this->subject = new ‪Dimension(‪Icon::SIZE_DEFAULT);
40  }
41 
45  public function ‪getWidthReturnsValidInteger(): void
46  {
47  $value = $this->subject->getWidth();
48  self::assertEquals($this->width, $value);
49  self::assertIsInt($value);
50  }
51 
55  public function ‪getHeightReturnsValidInteger(): void
56  {
57  $value = $this->subject->getHeight();
58  self::assertEquals($this->height, $value);
59  self::assertIsInt($value);
60  }
61 }
‪TYPO3\CMS\Core\Imaging\Icon\SIZE_DEFAULT
‪const SIZE_DEFAULT
Definition: Icon.php:35
‪TYPO3\CMS\Core\Tests\Unit\Imaging\DimensionTest\getHeightReturnsValidInteger
‪getHeightReturnsValidInteger()
Definition: DimensionTest.php:55
‪TYPO3\CMS\Core\Imaging\Icon
Definition: Icon.php:26
‪TYPO3\CMS\Core\Tests\Unit\Imaging
Definition: DimensionTest.php:18
‪TYPO3\CMS\Core\Imaging\Dimension
Definition: Dimension.php:22
‪TYPO3\CMS\Core\Tests\Unit\Imaging\DimensionTest\$height
‪int $height
Definition: DimensionTest.php:31
‪TYPO3\CMS\Core\Tests\Unit\Imaging\DimensionTest\$width
‪int $width
Definition: DimensionTest.php:30
‪TYPO3\CMS\Core\Tests\Unit\Imaging\DimensionTest
Definition: DimensionTest.php:28
‪TYPO3\CMS\Core\Tests\Unit\Imaging\DimensionTest\getWidthReturnsValidInteger
‪getWidthReturnsValidInteger()
Definition: DimensionTest.php:45
‪TYPO3\CMS\Core\Tests\Unit\Imaging\DimensionTest\$subject
‪Dimension $subject
Definition: DimensionTest.php:29
‪TYPO3\CMS\Core\Tests\Unit\Imaging\DimensionTest\setUp
‪setUp()
Definition: DimensionTest.php:36