public function VariantCollectionTraitTest::testGetVariantsEmpty in Chaos Tool Suite (ctools) 8.3
@covers ::getVariants
File
- tests/
src/ Unit/ VariantCollectionTraitTest.php, line 41
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));
}