‪TYPO3CMS  9.5
DimensionTest.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 
18 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
19 
23 class ‪DimensionTest extends UnitTestCase
24 {
28  protected ‪$subject;
29 
33  protected ‪$width = 32;
34 
38  protected ‪$height = 32;
39 
43  protected function ‪setUp()
44  {
45  $this->subject = new \TYPO3\CMS\Core\Imaging\Dimension(‪Icon::SIZE_DEFAULT);
46  }
47 
51  public function ‪getWidthReturnsValidInteger()
52  {
53  $value = $this->subject->getWidth();
54  $this->assertEquals($this->width, $value);
55  $this->assertInternalType('int', $value);
56  }
57 
61  public function ‪getHeightReturnsValidInteger()
62  {
63  $value = $this->subject->getHeight();
64  $this->assertEquals($this->height, $value);
65  $this->assertInternalType('int', $value);
66  }
67 }
‪TYPO3\CMS\Core\Imaging\Icon\SIZE_DEFAULT
‪const SIZE_DEFAULT
Definition: Icon.php:34
‪TYPO3\CMS\Core\Tests\Unit\Imaging\DimensionTest\getHeightReturnsValidInteger
‪getHeightReturnsValidInteger()
Definition: DimensionTest.php:58
‪TYPO3\CMS\Core\Imaging\Icon
Definition: Icon.php:25
‪TYPO3\CMS\Core\Tests\Unit\Imaging
Definition: DimensionTest.php:2
‪TYPO3\CMS\Core\Tests\Unit\Imaging\DimensionTest\$subject
‪TYPO3 CMS Core Imaging Dimension $subject
Definition: DimensionTest.php:27
‪TYPO3\CMS\Core\Tests\Unit\Imaging\DimensionTest\$height
‪int $height
Definition: DimensionTest.php:35
‪TYPO3\CMS\Core\Tests\Unit\Imaging\DimensionTest\$width
‪int $width
Definition: DimensionTest.php:31
‪TYPO3\CMS\Core\Tests\Unit\Imaging\DimensionTest
Definition: DimensionTest.php:24
‪TYPO3\CMS\Core\Tests\Unit\Imaging\DimensionTest\getWidthReturnsValidInteger
‪getWidthReturnsValidInteger()
Definition: DimensionTest.php:48
‪TYPO3\CMS\Core\Tests\Unit\Imaging\DimensionTest\setUp
‪setUp()
Definition: DimensionTest.php:40