fix ApiCall test on PHP7.4

Since PHP7.4 has no primitive type hints and PHP native methods have no
accessible docblocks, we can not use a native function for testing
(types always come back as string).
This commit is contained in:
Andreas Gohr 2023-12-01 15:49:51 +01:00
parent d073bfe622
commit fedb877023
1 changed files with 6 additions and 6 deletions

View File

@ -67,18 +67,18 @@ class ApiCallTest extends \DokuWikiTest
public function testFunctionDocBlock()
{
$call = new ApiCall('date');
$call->setArgDescription('format', 'The format');
$call = new ApiCall('inlineSVG');
$call->setArgDescription('file', 'overwritten description');
$this->assertEquals(
[
'format' => [
'file' => [
'type' => 'string',
'description' => 'The format',
'description' => 'overwritten description',
],
'timestamp' => [
'maxsize' => [
'type' => 'int',
'description' => '',
'description' => 'maximum allowed size for the SVG to be embedded',
]
],
$call->getArgs()