public function FeaturesBundleTest::setUp in Features 8.3
Same name and namespace in other branches
- 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\UnitCode
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());
}