55 calls to Drupal::getContainer()

BigPipeTestController::test in core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php
Returns a all BigPipe placeholder test case render arrays.
BlockUiTest::testBlockPlacementIndicator in core/modules/block/tests/src/Functional/BlockUiTest.php
Tests the block placement indicator.
Cache::getBins in core/lib/Drupal/Core/Cache/Cache.php
Gets all cache bin services.
ConfigInstallTest::installModules in core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
Installs a module.
ConfigOtherModuleTest::installModule in core/modules/config/tests/src/Functional/ConfigOtherModuleTest.php
Installs a module.
ConfigOtherModuleTest::uninstallModule in core/modules/config/tests/src/Functional/ConfigOtherModuleTest.php
Uninstalls a module.
ContainerDerivativeDiscoveryDecorator::getDeriver in core/lib/Drupal/Core/Plugin/Discovery/ContainerDerivativeDiscoveryDecorator.php
Gets a deriver for a base plugin.
ContainerFactory::createInstance in core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php
Creates a pre-configured instance of a plugin.
ControllerBase::container in core/lib/Drupal/Core/Controller/ControllerBase.php
Returns the service container.
DependencySerializationTrait::__wakeup in core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php
DisplayPluginBase::elementPreRender in core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
#pre_render callback for view display rendering.
DrupalTest::testGetContainerException in core/tests/Drupal/Tests/Core/DrupalTest.php
@covers ::getContainer
DrupalTest::testSetContainer in core/tests/Drupal/Tests/Core/DrupalTest.php
Tests the get/setContainer() method.
EntityKernelTestBase::refreshServices in core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php
Refresh services.
EntityUnitTestBase::refreshServices in core/modules/system/src/Tests/Entity/EntityUnitTestBase.php
Refresh services.
field_ui_local_tasks_alter in core/modules/field_ui/field_ui.module
Implements hook_local_tasks_alter().
FormatterPluginManager::createInstance in core/lib/Drupal/Core/Field/FormatterPluginManager.php
FormBase::container in core/lib/Drupal/Core/Form/FormBase.php
Returns the service container.
FunctionalTestSetupTrait::installModulesFromClassProperty in core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php
Install modules defined by `static::$modules`.
FunctionalTestSetupTrait::resetAll in core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php
Resets all data structures after having enabled new modules.
KernelTestBaseTest::setUp in core/modules/simpletest/src/Tests/KernelTestBaseTest.php
Performs setup tasks before each individual test method is run.
KernelTestBaseTest::testRegister in core/tests/Drupal/KernelTests/KernelTestBaseTest.php
@covers ::register
LocalTaskManagerTest::setupNullCacheabilityMetadataValidation in core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php
MessengerLegacyTest::testMessages in core/tests/Drupal/KernelTests/Core/Messenger/MessengerLegacyTest.php
@covers \Drupal::messenger @covers ::getMessengerService @covers ::all @covers ::addMessage @covers ::addError @covers ::addStatus @covers ::addWarning
MigratePluginManager::createInstance in core/modules/migrate/src/Plugin/MigratePluginManager.php
Creates a pre-configured instance of a migration plugin.
MigrateSqlSourceTestCase::setUp in core/modules/migrate/tests/src/Unit/MigrateSqlSourceTestCase.php
MigrationPluginManager::createStubMigration in core/modules/migrate/src/Plugin/MigrationPluginManager.php
Creates a stub migration plugin from a definition array.
NodeOwnerTest::testOwner in core/modules/node/tests/src/Kernel/NodeOwnerTest.php
Tests node owner functionality.
NodeTypeTest::testNodeTypeDeletion in core/modules/node/tests/src/Functional/NodeTypeTest.php
Tests deleting a content type that still has content.
PathAliasToEntityUpdateTest::testConversionToEntities in core/modules/system/tests/src/Functional/Update/PathAliasToEntityUpdateTest.php
Tests the conversion of path aliases to entities.
RedirectResponseSubscriberTest::testDestinationRedirect in core/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php
Test destination detection and redirection.
RedirectResponseSubscriberTest::testDestinationRedirectToExternalUrl in core/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php
@dataProvider providerTestDestinationRedirectToExternalUrl
RedirectResponseSubscriberTest::testDestinationRedirectWithInvalidUrl in core/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php
@dataProvider providerTestDestinationRedirectWithInvalidUrl
RedirectResponseSubscriberTest::testRedirectWithOptInExternalUrl in core/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php
@covers ::checkRedirectUrl
RouteProvider::lazyLoadItself in core/tests/Drupal/KernelTests/RouteProvider.php
Loads the real route provider from the container and rebuilds the router.
SimpletestResultsForm::submitForm in core/modules/simpletest/src/Form/SimpletestResultsForm.php
Form submission handler.
SimpleTestTest::setUp in core/modules/simpletest/src/Tests/SimpleTestTest.php
Sets up a Drupal site for running functional and integration tests.
simpletest_phpunit_command in core/modules/simpletest/simpletest.module
Returns the command to run PHPUnit.
simpletest_phpunit_run_command in core/modules/simpletest/simpletest.module
Executes the PHPUnit command.
simpletest_phpunit_xml_filepath in core/modules/simpletest/simpletest.module
Returns the path to use for PHPUnit's --log-junit option.
simpletest_run_phpunit_tests in core/modules/simpletest/simpletest.module
Executes PHPUnit tests and returns the results of the run.
simpletest_summarize_phpunit_result in core/modules/simpletest/simpletest.module
Maps phpunit results to a data structure for batch messages and run-tests.sh.
SqlTest::setupEntityTypeManager in core/modules/views/tests/src/Unit/Plugin/query/SqlTest.php
Sets up the entity type manager in the container.
SqlTest::setupViewsData in core/modules/views/tests/src/Unit/Plugin/query/SqlTest.php
Sets up the views data in the container.
TempStoreDatabaseTest::testSharedTempStore in core/tests/Drupal/KernelTests/Core/TempStore/TempStoreDatabaseTest.php
Tests the SharedTempStore API.
TempStoreDatabaseTest::testUserTempStore in core/modules/user/tests/src/Kernel/TempStoreDatabaseTest.php
Tests the UserTempStore API.
TestBase::prepareEnvironment in core/modules/simpletest/src/TestBase.php
Prepares the current environment for running the test.
ToolbarCacheContextsTest::installExtraModules in core/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php
Installs a given list of modules and rebuilds the cache.
UpdatePathTestBase::setUp in core/modules/system/src/Tests/Update/UpdatePathTestBase.php
Overrides WebTestBase::setUp() for update testing.
UpdatePathTestBase::setUp in core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php
Overrides WebTestBase::setUp() for update testing.
update_fix_compatibility in core/includes/update.inc
Disables any extensions that are incompatible with the current core version.
views_local_tasks_alter in core/modules/views/views.module
Implements hook_local_tasks_alter().
WidgetPluginManager::createInstance in core/lib/Drupal/Core/Field/WidgetPluginManager.php
WorkspaceTestTrait::initializeWorkspacesModule in core/modules/workspaces/tests/src/Kernel/WorkspaceTestTrait.php
Enables the Workspaces module and creates two workspaces.
_simpletest_batch_operation in core/modules/simpletest/simpletest.module
Implements callback_batch_operation().

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.