From cc678fb00bfae27c6e65f7a11cc0feffc02c7bd5 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Fri, 26 Apr 2024 10:58:17 +0200 Subject: [PATCH] Remove calls to `getMockForAbstractClass()` --- Tests/Definition/BaseNodeTest.php | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/Tests/Definition/BaseNodeTest.php b/Tests/Definition/BaseNodeTest.php index 4ea8469ef..d2f0593cc 100644 --- a/Tests/Definition/BaseNodeTest.php +++ b/Tests/Definition/BaseNodeTest.php @@ -36,7 +36,36 @@ public function testGetPathForChildNode(string $expected, array $params) } } - $node = $this->getMockForAbstractClass(BaseNode::class, $constructorArgs); + $node = new class(...$constructorArgs) extends BaseNode { + protected function validateType($value): void + { + } + + protected function normalizeValue($value) + { + return null; + } + + protected function mergeValues($leftSide, $rightSide) + { + return null; + } + + protected function finalizeValue($value) + { + return null; + } + + public function hasDefaultValue(): bool + { + return true; + } + + public function getDefaultValue() + { + return null; + } + }; $this->assertSame($expected, $node->getPath()); }