function RectangleTest::testWrongHeight

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Component/Utility/RectangleTest.php \Drupal\Tests\Component\Utility\RectangleTest::testWrongHeight()
  2. 8.9.x core/tests/Drupal/Tests/Component/Utility/RectangleTest.php \Drupal\Tests\Component\Utility\RectangleTest::testWrongHeight()
  3. 10 core/tests/Drupal/Tests/Component/Utility/RectangleTest.php \Drupal\Tests\Component\Utility\RectangleTest::testWrongHeight()

Tests wrong rectangle height.

@covers ::rotate

File

core/tests/Drupal/Tests/Component/Utility/RectangleTest.php, line 31

Class

RectangleTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Component%21Utility%21Rectangle.php/class/Rectangle/11.x" title="Rectangle rotation algebra class." class="local">\Drupal\Component\Utility\Rectangle</a> @group Image

Namespace

Drupal\Tests\Component\Utility

Code

public function testWrongHeight() : void {
    $this->expectException(\InvalidArgumentException::class);
    $rect = new Rectangle(40, 0);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.