Skip to content

Commit

Permalink
Switch parameter test provider cases to nowdoc format for multilines
Browse files Browse the repository at this point in the history
  • Loading branch information
DZunke committed Nov 20, 2024
1 parent 11e1a1f commit 1d161de
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions tests/ToolBox/ParameterAnalyzerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,24 +215,31 @@ public static function provideGetParameterDescriptionCases(): \Generator
];

yield 'multi line doc block with description and other tags' => [
'docComment' => '/** @param string $myParam The description
* @return void
*/',
'docComment' => <<<'TEXT'
/**
* @param string $myParam The description
* @return void
*/
TEXT,
'expectedResult' => 'The description',
];

yield 'multi line doc block with multiple parameters' => [
'docComment' => '/**
* @param string $myParam The description
* @param string $anotherParam The wrong description
*/',
'docComment' => <<<'TEXT'
/**
* @param string $myParam The description
* @param string $anotherParam The wrong description
*/
TEXT,
'expectedResult' => 'The description',
];

yield 'multi line doc block with parameter that is not searched for' => [
'docComment' => '/**
* @param string $unknownParam The description
*/',
'docComment' => <<<'TEXT'
/**
* @param string $unknownParam The description
*/
TEXT,
'expectedResult' => '',
];
}
Expand Down

0 comments on commit 1d161de

Please sign in to comment.