57 calls to Drupal::getContainer()

BigPipeTestController::test in core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php
Returns 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.
Cache::getMemoryBins in core/lib/Drupal/Core/Cache/Cache.php
Gets all memory 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/Kernel/ConfigOtherModuleTest.php
Installs a module.
ConfigOtherModuleTest::uninstallModule in core/modules/config/tests/src/Kernel/ConfigOtherModuleTest.php
Uninstalls a module.
ConstraintFactory::createInstance in core/lib/Drupal/Core/Validation/ConstraintFactory.php
ContactLinkTest::setUp in core/modules/contact/tests/src/Unit/ContactLinkTest.php
ContainerDerivativeDiscoveryDecorator::getDeriver in core/lib/Drupal/Core/Plugin/Discovery/ContainerDerivativeDiscoveryDecorator.php
ContainerFactory::createInstance in core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php
ContentEntityBaseUnitTest::testTypedData in core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php
Tests each condition in EntityBase::getTypedData().
ControllerBase::container in core/lib/Drupal/Core/Controller/ControllerBase.php
Returns the service container.
DependencySerializationTrait::__sleep in core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php
DependencySerializationTrait::__wakeup in core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php
DisplayPluginBase::elementPreRender in core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
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.
Extension::__wakeup in core/lib/Drupal/Core/Extension/Extension.php
Magic method implementation to unserialize the extension object.
FieldEntityTest::testGetEntityNullEntityOptionalRelationship in core/modules/views/tests/src/Kernel/Entity/FieldEntityTest.php
Tests the getEntity method returning NULL for an optional relationship.
FieldEntityTest::testGetEntityNullEntityOptionalRelationship in core/modules/views/tests/src/Functional/Entity/FieldEntityTest.php
Tests the getEntity method returning NULL for an optional relationship.
FieldUiHooks::localTasksAlter in core/modules/field_ui/src/Hook/FieldUiHooks.php
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::testRegister in core/tests/Drupal/KernelTests/KernelTestBaseTest.php
@covers ::register
LanguageNegotiationTestBase::createLanguageNegotiationPlugin in core/modules/language/tests/src/Unit/Plugin/LanguageNegotiation/LanguageNegotiationTestBase.php
Creates a @LanguageNegotiation plugin using the factory ::create method.
LinkApproveTest::setUp in core/modules/comment/tests/src/Unit/Plugin/views/field/LinkApproveTest.php
LinkBaseTest::setUp in core/modules/views/tests/src/Unit/Plugin/views/field/LinkBaseTest.php
LinkReplyTest::setUp in core/modules/comment/tests/src/Unit/Plugin/views/field/LinkReplyTest.php
LocalTaskManagerTest::setupNullCacheabilityMetadataValidation in core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php
MigratePluginManager::createInstance in core/modules/migrate/src/Plugin/MigratePluginManager.php
MigrationPluginManager::createStubMigration in core/modules/migrate/src/Plugin/MigrationPluginManager.php
NodeAccessTest::testQueryWithBaseTableJoin in core/modules/node/tests/src/Kernel/NodeAccessTest.php
Tests node grants for queries with node access checks and base table join.
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.
PermissionsTest::setUp in core/modules/user/tests/src/Unit/Plugin/views/field/PermissionsTest.php
RecipeCommand::rollBackToCheckpoint in core/lib/Drupal/Core/Recipe/RecipeCommand.php
Rolls config back to a particular checkpoint.
RevisionLinkDeleteTest::setUp in core/modules/node/tests/src/Unit/Plugin/views/field/RevisionLinkDeleteTest.php
RevisionLinkRevertTest::setUp in core/modules/node/tests/src/Unit/Plugin/views/field/RevisionLinkRevertTest.php
RevisionLinkTest::setUp in core/modules/node/tests/src/Unit/Plugin/views/field/RevisionLinkTest.php
RouteProvider::lazyLoadItself in core/tests/Drupal/KernelTests/RouteProvider.php
Loads the real route provider from the container and rebuilds the router.
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.
TestClass::onKernelResponseTest in core/modules/system/tests/modules/service_provider_test/src/TestClass.php
Flags the response in case a rebuild indicator is used.
TestRunTest::testProcessPhpUnitResults in core/tests/Drupal/KernelTests/Core/Test/TestRunTest.php
@covers ::insertLogEntry
ToolbarCacheContextsTest::installExtraModules in core/modules/toolbar/tests/src/Functional/ToolbarCacheContextsTest.php
Installs a given list of modules and rebuilds the cache.
TwigEnvironmentTest::testTwigFilePrefixChange in core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php
Test twig file prefix change.
UpdatePathTestBase::installDrupal in core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php
Overrides BrowserTestBase::installDrupal() for update testing.
UrlResolverTest::testResourceUrlAlterHook in core/modules/media/tests/src/Functional/UrlResolverTest.php
Tests that hook_oembed_resource_url_alter() is invoked.
UserControllerTest::setUp in core/modules/user/tests/src/Kernel/Controller/UserControllerTest.php
ViewsHooks::localTasksAlter in core/modules/views/src/Hook/ViewsHooks.php
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.

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