function VariantCollectionTraitTest::setUp

Same name and namespace in other branches
  1. 8.x-3.x tests/src/Unit/VariantCollectionTraitTest.php \Drupal\Tests\ctools\Unit\VariantCollectionTraitTest::setUp()

Overrides UnitTestCase::setUp

File

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

Class

VariantCollectionTraitTest
Tests the methods of a variant-aware class.

Namespace

Drupal\Tests\ctools\Unit

Code

protected function setUp() : void {
  parent::setUp();
  $container = new ContainerBuilder();
  $this->manager = $this->prophesize(PluginManagerInterface::class);
  $container->set('plugin.manager.display_variant', $this->manager
    ->reveal());
  \Drupal::setContainer($container);
}