Skip to content
Snippets Groups Projects
Commit 12592a2e authored by Angie Byron's avatar Angie Byron
Browse files

Issue #2183887 by tim.plunkett: Remove Drupal::setContainer from LocalActionDefaultTest.

parent fd06a6c0
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
namespace Drupal\Tests\Core\Menu; namespace Drupal\Tests\Core\Menu;
use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\Menu\LocalActionDefault; use Drupal\Core\Menu\LocalActionDefault;
use Drupal\Tests\UnitTestCase; use Drupal\Tests\UnitTestCase;
...@@ -81,11 +80,8 @@ protected function setUp() { ...@@ -81,11 +80,8 @@ protected function setUp() {
* Setups the local action default. * Setups the local action default.
*/ */
protected function setupLocalActionDefault() { protected function setupLocalActionDefault() {
$container = new ContainerBuilder();
$container->set('string_translation', $this->stringTranslation);
\Drupal::setContainer($container);
$this->localActionDefault = new LocalActionDefault($this->config, $this->pluginId, $this->pluginDefinition, $this->routeProvider); $this->localActionDefault = new LocalActionDefault($this->config, $this->pluginId, $this->pluginDefinition, $this->routeProvider);
$this->localActionDefault->setTranslationManager($this->stringTranslation);
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment