diff --git a/core/tests/Drupal/Tests/Component/Plugin/Context/ContextTest.php b/core/tests/Drupal/Tests/Component/Plugin/Context/ContextTest.php index 192331c9937..f9656cfc5e0 100644 --- a/core/tests/Drupal/Tests/Component/Plugin/Context/ContextTest.php +++ b/core/tests/Drupal/Tests/Component/Plugin/Context/ContextTest.php @@ -103,7 +103,7 @@ class ContextTest extends TestCase { */ public function testHasContextValue($has_context_value, $default_value): void { $mock_definition = $this->getMockBuilder('Drupal\Component\Plugin\Context\ContextDefinitionInterface') - ->setMethods(['getDefaultValue']) + ->onlyMethods(['getDefaultValue']) ->getMockForAbstractClass(); $mock_definition->expects($this->atLeastOnce())