You are here

public function WishlistPurchaseTest::testCreateFromInvalidArray in Commerce Wishlist 8.3

Tests creating a purchase from an invalid array.

::covers __construct. ::covers fromArray().

File

tests/src/Unit/WishlistPurchaseTest.php, line 29

Class

WishlistPurchaseTest
Tests the WishlistPurchase class.

Namespace

Drupal\Tests\commerce_wishlist\Unit

Code

public function testCreateFromInvalidArray() {
  $this
    ->expectException(\InvalidArgumentException::class);
  WishlistPurchase::fromArray([]);
}