You are here

public function FeaturesBundleTest::setUp in Features 8.3

Same name and namespace in other branches
  1. 8.4 tests/src/Unit/FeaturesBundleTest.php \Drupal\Tests\features\Unit\FeaturesBundleTest::setUp()

Overrides UnitTestCase::setUp

File

tests/src/Unit/FeaturesBundleTest.php, line 17

Class

FeaturesBundleTest
@coversDefaultClass Drupal\features\Entity\FeaturesBundle @group features

Namespace

Drupal\Tests\features\Unit

Code

public function setUp() {
  parent::setUp();

  // Mock an assigner.
  $manager = new DummyPluginManager();

  // Mock the container.
  $container = $this
    ->prophesize('\\Symfony\\Component\\DependencyInjection\\ContainerInterface');
  $container
    ->get('plugin.manager.features_assignment_method')
    ->willReturn($manager);
  \Drupal::setContainer($container
    ->reveal());
}