From 04e20da58f109518b47637a6cee7c9e2f72cf2e3 Mon Sep 17 00:00:00 2001 From: Nate Abele Date: Tue, 29 May 2012 08:57:05 -0400 Subject: [PATCH] Fixing issue in `Help` command where full class descriptions were not being printed properly. --- tests/cases/console/command/HelpTest.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/cases/console/command/HelpTest.php b/tests/cases/console/command/HelpTest.php index 19a7b14ba6..d6872b5ec0 100644 --- a/tests/cases/console/command/HelpTest.php +++ b/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]); + } } ?> \ No newline at end of file