Skip to content

Commit

Permalink
Remove calls to getMockForAbstractClass()
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-daubois committed May 15, 2024
1 parent 247e98d commit cc678fb
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion Tests/Definition/BaseNodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit cc678fb

Please sign in to comment.