diff --git a/composer.json b/composer.json index ee798e6d..eb1b5f5c 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ ], "require": { "php": "^8.3", - "phpunit/phpunit": "^9.5", + "phpunit/phpunit": "^11.3", "squizlabs/php_codesniffer": "^3.7", "behat/behat": "^3.11.0", "behat/mink": "^1.10.0", diff --git a/tests/php/SilverStripeContextTest.php b/tests/php/SilverStripeContextTest.php index 78058992..465f1591 100644 --- a/tests/php/SilverStripeContextTest.php +++ b/tests/php/SilverStripeContextTest.php @@ -67,14 +67,14 @@ protected function getContextMock() { $pageMock = $this->getMockBuilder(DocumentElement::class) ->disableOriginalConstructor() - ->setMethods(array('find')) + ->onlyMethods(array('find')) ->getMock(); $sessionMock = $this->getMockBuilder(Session::class) ->setConstructorArgs(array( $this->getMockBuilder(DriverInterface::class)->getMock(), $this->getMockBuilder(SelectorsHandler::class)->getMock() )) - ->setMethods(array('getPage')) + ->onlyMethods(array('getPage')) ->getMock(); $sessionMock->expects($this->any()) ->method('getPage')