You are here

public function WeightTest::testInvalidUnit in Physical Fields 8

::covers __construct.

File

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

Class

WeightTest
Tests the weight class.

Namespace

Drupal\Tests\physical\Unit

Code

public function testInvalidUnit() {
  $this
    ->expectException(\InvalidArgumentException::class);
  $weight = new Weight('1', 'm');
}