function RectangleTest::testWrongWidth

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

Tests wrong rectangle width.

@covers ::rotate

File

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

Class

RectangleTest
@coversDefaultClass \Drupal\Component\Utility\Rectangle @group Image

Namespace

Drupal\Tests\Component\Utility

Code

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

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