mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
Fix tests
This commit is contained in:
parent
0868d39e9a
commit
e7152678a7
@ -39,8 +39,8 @@ class MarkdownFormatter extends AbstractFormatter
|
||||
foreach ($data['requirements'] as $name => $infos) {
|
||||
$markdown .= sprintf("**%s**\n\n", $name);
|
||||
|
||||
if (!empty($infos['value'])) {
|
||||
$markdown .= sprintf(" - Value: %s\n", $infos['value']);
|
||||
if (!empty($infos['requirement'])) {
|
||||
$markdown .= sprintf(" - Requirement: %s\n", $infos['requirement']);
|
||||
}
|
||||
|
||||
if (!empty($infos['type'])) {
|
||||
|
@ -157,7 +157,7 @@ _This method is useful to test if the getDocComment works._
|
||||
|
||||
**id**
|
||||
|
||||
- Value: \d+
|
||||
- Requirement: \d+
|
||||
MARKDOWN;
|
||||
|
||||
$this->assertEquals($expected, $result);
|
||||
|
@ -172,7 +172,7 @@ class SimpleFormatterTest extends WebTestCase
|
||||
'uri' => '/any/{foo}',
|
||||
'requirements' =>
|
||||
array(
|
||||
'foo' => array('type' => '', 'description' => '', 'value' => ''),
|
||||
'foo' => array('type' => '', 'description' => '', 'requirement' => ''),
|
||||
),
|
||||
'description' => 'Action without HTTP verb',
|
||||
),
|
||||
@ -182,8 +182,8 @@ class SimpleFormatterTest extends WebTestCase
|
||||
'uri' => '/my-commented/{id}/{page}',
|
||||
'requirements' =>
|
||||
array(
|
||||
'id' => array('type' => 'int', 'description' => 'A nice comment', 'value' => ''),
|
||||
'page' => array('type' => 'int', 'description' => '', 'value' => ''),
|
||||
'id' => array('type' => 'int', 'description' => 'A nice comment', 'requirement' => ''),
|
||||
'page' => array('type' => 'int', 'description' => '', 'requirement' => ''),
|
||||
),
|
||||
'description' => 'This method is useful to test if the getDocComment works.',
|
||||
'documentation' => "This method is useful to test if the getDocComment works.\nAnd, it supports multilines until the first '@' char."
|
||||
@ -194,7 +194,7 @@ class SimpleFormatterTest extends WebTestCase
|
||||
'uri' => '/yet-another/{id}',
|
||||
'requirements' =>
|
||||
array(
|
||||
'id' => array('type' => '', 'description' => '', 'value' => '\d+')
|
||||
'id' => array('type' => '', 'description' => '', 'requirement' => '\d+')
|
||||
),
|
||||
),
|
||||
),
|
||||
|
Loading…
x
Reference in New Issue
Block a user