function VariantCollectionTraitTest::testGetVariantsEmpty
Same name in other branches
- 8.x-3.x tests/src/Unit/VariantCollectionTraitTest.php \Drupal\Tests\ctools\Unit\VariantCollectionTraitTest::testGetVariantsEmpty()
@covers ::getVariants
File
-
tests/
src/ Unit/ VariantCollectionTraitTest.php, line 43
Class
- VariantCollectionTraitTest
- Tests the methods of a variant-aware class.
Namespace
Drupal\Tests\ctools\UnitCode
public function testGetVariantsEmpty() {
$trait_object = new TestVariantCollectionTrait();
$this->manager
->createInstance()
->shouldNotBeCalled();
$variants = $trait_object->getVariants();
$this->assertInstanceOf(VariantPluginCollection::class, $variants);
$this->assertSame(0, count($variants));
}