Skip to content
Snippets Groups Projects
Commit 85ff4063 authored by catch's avatar catch
Browse files

Issue #3418459 by longwave: Remove withConsecutive() in DerivativeDiscoveryDecoratorTest

parent 110c3f05
No related branches found
No related tags found
No related merge requests found
...@@ -3346,11 +3346,6 @@ parameters: ...@@ -3346,11 +3346,6 @@ parameters:
count: 1 count: 1
path: tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php path: tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php
-
message: "#^Call to deprecated method withConsecutive\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\Builder\\\\InvocationMocker\\.$#"
count: 1
path: tests/Drupal/Tests/Core/Plugin/Discovery/DerivativeDiscoveryDecoratorTest.php
- -
message: "#^Constructor of class Drupal\\\\Tests\\\\Core\\\\Plugin\\\\Discovery\\\\TestContainerDerivativeDiscovery has an unused parameter \\$example_service\\.$#" message: "#^Constructor of class Drupal\\\\Tests\\\\Core\\\\Plugin\\\\Discovery\\\\TestContainerDerivativeDiscovery has an unused parameter \\$example_service\\.$#"
count: 1 count: 1
......
...@@ -243,12 +243,15 @@ public function testSingleExistingDerivative() { ...@@ -243,12 +243,15 @@ public function testSingleExistingDerivative() {
'null_value' => NULL, 'null_value' => NULL,
]; ];
$this->discoveryMain->expects($this->exactly(2)) $ids = [
$derivative_definition['id'],
$base_definition['id'],
];
$this->discoveryMain->expects($this->exactly(count($ids)))
->method('getDefinition') ->method('getDefinition')
->withConsecutive( ->with($this->callback(function (string $id) use (&$ids): bool {
['non_container_aware_discovery:test_discovery_1'], return array_shift($ids) === $id;
['non_container_aware_discovery'], }))
)
->willReturnOnConsecutiveCalls( ->willReturnOnConsecutiveCalls(
$derivative_definition, $derivative_definition,
$base_definition, $base_definition,
......
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