diff --git a/tests/PhpSpreadsheetTests/Calculation/CustomFunctionTest.php b/tests/PhpSpreadsheetTests/Calculation/CustomFunctionTest.php index 5d9aa974b..454227aa4 100644 --- a/tests/PhpSpreadsheetTests/Calculation/CustomFunctionTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/CustomFunctionTest.php @@ -39,6 +39,13 @@ class CustomFunctionTest extends TestCase self::assertTrue(Calculation::addFunction($key, $value)); self::assertSame(1.0, $calculation->calculateFormula('=NATIVECOS(0)')); self::assertTrue(Calculation::removeFunction($key)); + $key = 'PI'; + $value = [ + 'category' => 'custom', + 'functionCall' => 'pi', + 'argumentCount' => '0', + ]; + self::assertFalse(Calculation::addFunction($key, $value)); } public static function testReplaceDummyFunction(): void