You are here

public function LengthTest::testInvalidUnit in Physical Fields 8

::covers __construct.

File

tests/src/Unit/LengthTest.php, line 35

Class

LengthTest
Tests the length class.

Namespace

Drupal\Tests\physical\Unit

Code

public function testInvalidUnit() {
  $this
    ->expectException(\InvalidArgumentException::class);
  $length = new Length('1', 'kg');
}