‪TYPO3CMS  10.4
DimensionTest.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 ‪DimensionTest extends UnitTestCase
26 {
30  protected ‪$subject;
31 
35  protected ‪$width = 32;
36 
40  protected ‪$height = 32;
41 
45  protected function ‪setUp(): void
46  {
47  parent::setUp();
48  $this->subject = new ‪Dimension(‪Icon::SIZE_DEFAULT);
49  }
50 
54  public function ‪getWidthReturnsValidInteger()
55  {
56  $value = $this->subject->getWidth();
57  self::assertEquals($this->width, $value);
58  self::assertIsInt($value);
59  }
60 
64  public function ‪getHeightReturnsValidInteger()
65  {
66  $value = $this->subject->getHeight();
67  self::assertEquals($this->height, $value);
68  self::assertIsInt($value);
69  }
70 }
‪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:61
‪TYPO3\CMS\Core\Imaging\Icon
Definition: Icon.php:26
‪TYPO3\CMS\Core\Tests\Unit\Imaging
Definition: DimensionTest.php:16
‪TYPO3\CMS\Core\Tests\Unit\Imaging\DimensionTest\$subject
‪TYPO3 CMS Core Imaging Dimension $subject
Definition: DimensionTest.php:29
‪TYPO3\CMS\Core\Imaging\Dimension
Definition: Dimension.php:22
‪TYPO3\CMS\Core\Tests\Unit\Imaging\DimensionTest\$height
‪int $height
Definition: DimensionTest.php:37
‪TYPO3\CMS\Core\Tests\Unit\Imaging\DimensionTest\$width
‪int $width
Definition: DimensionTest.php:33
‪TYPO3\CMS\Core\Tests\Unit\Imaging\DimensionTest
Definition: DimensionTest.php:26
‪TYPO3\CMS\Core\Tests\Unit\Imaging\DimensionTest\getWidthReturnsValidInteger
‪getWidthReturnsValidInteger()
Definition: DimensionTest.php:51
‪TYPO3\CMS\Core\Tests\Unit\Imaging\DimensionTest\setUp
‪setUp()
Definition: DimensionTest.php:42