From 60638c8fefcf010cf2578efc0d4c3a72ba71c127 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Tue, 10 Sep 2024 11:28:40 +1200 Subject: [PATCH] DEP Use PHPUnit 11 --- composer.json | 2 +- tests/php/RegisterHandlerTest.php | 2 +- tests/php/VerifyHandlerTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 7bcc962..9841b63 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "paragonie/constant_time_encoding": "^2.6" }, "require-dev": { - "phpunit/phpunit": "^9.6", + "phpunit/phpunit": "^11.3", "squizlabs/php_codesniffer": "^3", "silverstripe/documentation-lint": "^1", "silverstripe/recipe-testing": "^4", diff --git a/tests/php/RegisterHandlerTest.php b/tests/php/RegisterHandlerTest.php index d10b963..0d3a354 100644 --- a/tests/php/RegisterHandlerTest.php +++ b/tests/php/RegisterHandlerTest.php @@ -89,7 +89,7 @@ public function testRegisterReturnsEncryptedSecret() /** @var RegisterHandler|MockObject $handler */ $handler = $this->getMockBuilder(RegisterHandler::class) - ->setMethods(['getTotp']) + ->onlyMethods(['getTotp']) ->getMock(); $handler->expects($this->once())->method('getTotp')->willReturn( /** @var TOTP|MockObject $totpMock */ diff --git a/tests/php/VerifyHandlerTest.php b/tests/php/VerifyHandlerTest.php index b997d38..8e8eba8 100644 --- a/tests/php/VerifyHandlerTest.php +++ b/tests/php/VerifyHandlerTest.php @@ -102,7 +102,7 @@ public function testVerify() $this->request->setBody(json_encode(['code' => '135246'])); /** @var VerifyHandler&MockObject $handler */ $handler = $this->getMockBuilder(VerifyHandler::class) - ->setMethods(['getTotp']) + ->onlyMethods(['getTotp']) ->getMock(); $handler->expects($this->once())->method('getTotp')->willReturn(