You are here

public function VariantCollectionTraitTest::testRemoveVariant in Chaos Tool Suite (ctools) 8.3

@covers ::removeVariant

@depends testGetVariant

File

tests/src/Unit/VariantCollectionTraitTest.php, line 134

Class

VariantCollectionTraitTest
Tests the methods of a variant-aware class.

Namespace

Drupal\Tests\ctools\Unit

Code

public function testRemoveVariant($data) {
  list($trait_object, $uuid) = $data;
  $this
    ->assertSame($trait_object, $trait_object
    ->removeVariant($uuid));
  $this
    ->assertFalse($trait_object
    ->getVariants()
    ->has($uuid));
  return [
    $trait_object,
    $uuid,
  ];
}