protected function RestIntegrationTest::installModulesFromClassProperty in Facets 8
Install modules defined by `static::$modules`.
To install test modules outside of the testing environment, add
$settings['extension_discovery_scan_tests'] = TRUE;
to your settings.php.
Parameters
\Symfony\Component\DependencyInjection\ContainerInterface $container: The container.
Overrides FunctionalTestSetupTrait::installModulesFromClassProperty
File
- modules/
facets_rest/ tests/ src/ Functional/ RestIntegrationTest.php, line 50
Class
- RestIntegrationTest
- Tests the integration of REST-views and facets.
Namespace
Drupal\Tests\facets_rest\FunctionalCode
protected function installModulesFromClassProperty(ContainerInterface $container) {
// This will just set the Drupal state to include the necessary bundles for
// our test entity type. Otherwise, fields from those bundles won't be found
// and thus removed from the test index. (We can't do it in setUp(), before
// calling the parent method, since the container isn't set up at that
// point.)
$bundles = [
'entity_test_mulrev_changed' => [
'label' => 'Entity Test Bundle',
],
'item' => [
'label' => 'item',
],
'article' => [
'label' => 'article',
],
];
\Drupal::state()
->set('entity_test_mulrev_changed.bundles', $bundles);
parent::installModulesFromClassProperty($container);
}