Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
test_helpers-3378383
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Issue forks
test_helpers-3378383
Commits
6e5f07e3
Commit
6e5f07e3
authored
1 year ago
by
Alexey Korepov
Browse files
Options
Downloads
Patches
Plain Diff
Fix failing test on Drupal 10.1
parent
1cea7318
No related branches found
Branches containing commit
Tags
1.0.0
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/src/Unit/TestHelpersApi/ServicesTest.php
+9
-17
9 additions, 17 deletions
tests/src/Unit/TestHelpersApi/ServicesTest.php
with
9 additions
and
17 deletions
tests/src/Unit/TestHelpersApi/ServicesTest.php
+
9
−
17
View file @
6e5f07e3
...
...
@@ -3,10 +3,9 @@
namespace
Drupal\Tests\test_helpers\Unit\TestHelpersApi
;
use
Drupal\Core\StringTranslation\StringTranslationTrait
;
use
Drupal\
dblog
\Plugin\
rest\resource\DBLogResource
;
use
Drupal\
media
\Plugin\
Derivative\DynamicLocalTasks
;
use
Drupal\Tests\UnitTestCase
;
use
Drupal\test_helpers
\TestHelpers
;
use
Psr\Log\LoggerInterface
;
use
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException
;
use
Drupal\Core\Entity\Controller\EntityController
;
use
Drupal\Core\Entity\EntityTypeInterface
;
...
...
@@ -203,24 +202,17 @@ class ServicesTest extends UnitTestCase {
* @covers ::createClass
*/
public
function
testCreateClass
()
{
$configuration
=
[];
$plugin_id
=
'my_plugin'
;
$plugin_definition
=
[];
$serializer_formats
=
[];
$logger
=
$this
->
createMock
(
LoggerInterface
::
class
);
TestHelpers
::
getContainer
()
->
setParameter
(
'serializer.formats'
,
[]);
TestHelpers
::
setServices
([
'string_translation'
,
'entity_type.manager'
,
]);
$class
=
TestHelpers
::
createClass
(
DBLogResource
::
class
,
[
$configuration
,
$plugin_id
,
$plugin_definition
,
$serializer_formats
,
$logger
,
DynamicLocalTasks
::
class
,
[
'plugin_id'
,
],
[
'
logger
.factory'
]);
[
'
config
.factory'
]);
$this
->
assertInstanceOf
(
D
BLogResource
::
class
,
$class
);
$this
->
assertInstanceOf
(
D
ynamicLocalTasks
::
class
,
$class
);
}
/**
...
...
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