From 6b175ba94d056ef29dfbcff9d3d9f621e92f6014 Mon Sep 17 00:00:00 2001 From: Jonathan Hanson Date: Sun, 15 Jan 2017 23:14:24 -0800 Subject: [PATCH] In order to address difficulties with pull request #64, this fix mocks out UnitOfMeasureInterface::isAliasOf() for the AbstractPhysicalQuantityTest unit test mock. --- tests/AbstractPhysicalQuantityTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/AbstractPhysicalQuantityTest.php b/tests/AbstractPhysicalQuantityTest.php index 19ce3f2..2936602 100644 --- a/tests/AbstractPhysicalQuantityTest.php +++ b/tests/AbstractPhysicalQuantityTest.php @@ -30,6 +30,12 @@ protected function getTestUnitOfMeasure($name, $aliases = []) ->willReturn($name); $newUnit->method('getAliases') ->willReturn($aliases); + $newUnit->method('isAliasOf') + ->will($this->returnCallback( + function ($value) use ($aliases) { + return in_array($value, $aliases); + } + )); return $newUnit; }