Browse files

Fixing issue in `Help` command where full class descriptions were not…

… being printed properly.
  • Loading branch information...
1 parent 97f0ca8 commit 04e20da58f109518b47637a6cee7c9e2f72cf2e3 @nateabele nateabele committed May 29, 2012
Showing with 16 additions and 0 deletions.
  1. +16 −0 tests/cases/console/command/HelpTest.php
View
16 tests/cases/console/command/HelpTest.php
@@ -172,6 +172,22 @@ public function testApiProperties() {
$result = $help->response->output;
$this->assertPattern("/{$expected}/s", $result);
}
+
+ /**
+ * Tests that the `Help` command prints a class' full description with all lines, not just the
+ * first.
+ */
+ public function testPrintFullClassDoc() {
+ $command = new Help(array(
+ 'request' => $this->request, 'classes' => $this->classes
+ ));
+
+ $this->assertTrue($command->run('Create'));
+ $lines = explode(PHP_EOL, $command->response->output);
+
+ $offset = array_search('DESCRIPTION', $lines);
+ $this->assertEqual('OPTIONS', $lines[$offset + 3]);
+ }
}
?>

0 comments on commit 04e20da

Please sign in to comment.