function VariantCollectionTraitTest::testGetVariant
Same name in other branches
- 8.x-3.x tests/src/Unit/VariantCollectionTraitTest.php \Drupal\Tests\ctools\Unit\VariantCollectionTraitTest::testGetVariant()
@covers ::getVariant
@depends testAddVariant
File
-
tests/
src/ Unit/ VariantCollectionTraitTest.php, line 123
Class
- VariantCollectionTraitTest
- Tests the methods of a variant-aware class.
Namespace
Drupal\Tests\ctools\UnitCode
public function testGetVariant($data) {
[
$trait_object,
$uuid,
$plugin,
] = $data;
$this->manager
->createInstance()
->shouldNotBeCalled();
$this->assertSame($plugin, $trait_object->getVariant($uuid));
return [
$trait_object,
$uuid,
];
}