From 474177a2bbc18a5821fadedd06f45bc043c35bb9 Mon Sep 17 00:00:00 2001 From: Eric Gesemann Date: Mon, 19 Feb 2024 11:29:08 +0100 Subject: [PATCH] fixed page model unit test --- tests/Helper/ConfigurationHelperTest.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/Helper/ConfigurationHelperTest.php b/tests/Helper/ConfigurationHelperTest.php index 06de7d5..31dbdbe 100644 --- a/tests/Helper/ConfigurationHelperTest.php +++ b/tests/Helper/ConfigurationHelperTest.php @@ -236,10 +236,12 @@ public function testGetPageModel() $pageModelAdapter = $this->mockAdapter(['findByPk']); $pageModelAdapter->method('findByPk')->willReturnCallback(function ($id) { - return match ($id) { - '3' => $this->mockClassWithProperties(PageModel::class, ['layoutId' => 3]), - default => null, - }; + switch ($id) { + case '3': + return $this->mockClassWithProperties(PageModel::class, ['layoutId' => 3]); + default: + return null; + } }); $contaoFramework = $this->mockContaoFramework([