You are here

public function IntervalTest::testInvalidUnit in Commerce Core 8.2

Tests creating an interval with an invalid unit.

::covers __construct.

File

tests/src/Kernel/IntervalTest.php, line 39

Class

IntervalTest
Tests the Interval class.

Namespace

Drupal\Tests\commerce\Kernel

Code

public function testInvalidUnit() {
  $this
    ->expectException(\InvalidArgumentException::class);
  $interval = new Interval('1', 'INVALID');
}