Issue #3250629 by paulocs, longwave: MockBuilder::setMethods is deprecated in PHPUnit8 and removed from PHPUnit10

(cherry picked from commit 588951bbf2)
merge-requests/1442/head
catch 2021-11-22 16:44:08 +00:00
parent 37a54000b8
commit f6ffe6aec6
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ class ContextTest extends TestCase {
*/ */
public function testHasContextValue($has_context_value, $default_value): void { public function testHasContextValue($has_context_value, $default_value): void {
$mock_definition = $this->getMockBuilder('Drupal\Component\Plugin\Context\ContextDefinitionInterface') $mock_definition = $this->getMockBuilder('Drupal\Component\Plugin\Context\ContextDefinitionInterface')
->setMethods(['getDefaultValue']) ->onlyMethods(['getDefaultValue'])
->getMockForAbstractClass(); ->getMockForAbstractClass();
$mock_definition->expects($this->atLeastOnce()) $mock_definition->expects($this->atLeastOnce())