diff --git a/Formatter/MarkdownFormatter.php b/Formatter/MarkdownFormatter.php index cc4270e..e01dd23 100644 --- a/Formatter/MarkdownFormatter.php +++ b/Formatter/MarkdownFormatter.php @@ -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'])) { diff --git a/Tests/Formatter/MarkdownFormatterTest.php b/Tests/Formatter/MarkdownFormatterTest.php index c42413a..db64529 100644 --- a/Tests/Formatter/MarkdownFormatterTest.php +++ b/Tests/Formatter/MarkdownFormatterTest.php @@ -157,7 +157,7 @@ _This method is useful to test if the getDocComment works._ **id** - - Value: \d+ + - Requirement: \d+ MARKDOWN; $this->assertEquals($expected, $result); diff --git a/Tests/Formatter/SimpleFormatterTest.php b/Tests/Formatter/SimpleFormatterTest.php index 1013d55..6a6f261 100644 --- a/Tests/Formatter/SimpleFormatterTest.php +++ b/Tests/Formatter/SimpleFormatterTest.php @@ -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+') ), ), ),