Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
836d08a7
Commit
836d08a7
authored
11 years ago
by
Angie Byron
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2183881
by tim.plunkett: Remove Drupal::setContainer from LocalTaskDefaultTest.
parent
255a33f5
Loading
Loading
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php
+13
-6
13 additions, 6 deletions
core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php
with
13 additions
and
6 deletions
core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php
+
13
−
6
View file @
836d08a7
...
...
@@ -7,8 +7,8 @@
namespace
Drupal\Tests\Core\Menu
;
use
Drupal\Core\DependencyInjection\ContainerBuilder
;
use
Drupal\Core\Menu\LocalTaskDefault
;
use
Drupal\Core\Routing\RouteProviderInterface
;
use
Drupal\Tests\UnitTestCase
;
use
Symfony\Component\DependencyInjection\ParameterBag\ParameterBag
;
use
Symfony\Component\HttpFoundation\Request
;
...
...
@@ -84,11 +84,11 @@ protected function setUp() {
* Setups the local task default.
*/
protected
function
setupLocalTaskDefault
()
{
$
container
=
new
ContainerBuilder
(
);
$
container
->
set
(
'string_translation'
,
$this
->
stringTranslation
);
$container
->
set
(
'r
oute
r.route_p
rovider
'
,
$this
->
routeProvider
)
;
\Drupal
::
setContainer
(
$container
);
$this
->
localTaskBase
=
new
LocalTaskDefault
(
$this
->
config
,
$this
->
pluginId
,
$this
->
pluginDefinition
);
$
this
->
localTaskBase
=
new
TestLocalTaskDefault
(
$this
->
config
,
$this
->
pluginId
,
$this
->
pluginDefinition
);
$
this
->
localTaskBase
->
set
R
oute
P
rovider
(
$this
->
routeProvider
)
->
setTranslationManager
(
$this
->
stringTranslation
);
}
/**
...
...
@@ -316,3 +316,10 @@ public function testGetOptions() {
}
}
class
TestLocalTaskDefault
extends
LocalTaskDefault
{
public
function
setRouteProvider
(
RouteProviderInterface
$route_provider
)
{
$this
->
routeProvider
=
$route_provider
;
return
$this
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment