From b14daa2f7b4369c848b33ee4d55561cf3fb8cb7d Mon Sep 17 00:00:00 2001 From: Adam Daley Date: Tue, 17 Mar 2026 12:16:46 +0000 Subject: [PATCH] Fixes for 2 code quality findings in `Servicedownloadable` (#3338) * Apply suggested fix to tests-legacy/modules/Servicedownloadable/ServiceTest.php from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> * Apply suggested fix to tests-legacy/modules/Servicedownloadable/ServiceTest.php from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- tests-legacy/modules/Servicedownloadable/ServiceTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests-legacy/modules/Servicedownloadable/ServiceTest.php b/tests-legacy/modules/Servicedownloadable/ServiceTest.php index cb913669f..1d40efc5f 100644 --- a/tests-legacy/modules/Servicedownloadable/ServiceTest.php +++ b/tests-legacy/modules/Servicedownloadable/ServiceTest.php @@ -136,7 +136,7 @@ final class ServiceTest extends \BBTestCase $productModel->loadBean(new \DummyBean()); $productModel->config = '{"filename": "existing.txt", "update_orders": true}'; - $dbMock = $this->getMockBuilder(\Box_Database::class)->getMock(); + $dbMock = $this->createMock(\Box_Database::class); $dbMock->expects($this->atLeastOnce()) ->method('store') ->with($productModel) @@ -169,7 +169,7 @@ final class ServiceTest extends \BBTestCase $productModel->loadBean(new \DummyBean()); $productModel->config = null; - $dbMock = $this->getMockBuilder(\Box_Database::class)->getMock(); + $dbMock = $this->createMock(\Box_Database::class); $dbMock->expects($this->atLeastOnce()) ->method('store') ->with($productModel)