Fix tests

This commit is contained in:
William DURAND 2012-07-18 12:46:22 +02:00
parent 0868d39e9a
commit e7152678a7
3 changed files with 7 additions and 7 deletions

View File

@ -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'])) {

View File

@ -157,7 +157,7 @@ _This method is useful to test if the getDocComment works._
**id**
- Value: \d+
- Requirement: \d+
MARKDOWN;
$this->assertEquals($expected, $result);

View File

@ -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+')
),
),
),