Skip to content
This repository
Browse code

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

… being printed properly.
  • Loading branch information...
commit 04e20da58f109518b47637a6cee7c9e2f72cf2e3 1 parent 97f0ca8
Nate Abele nateabele authored

Showing 1 changed file with 16 additions and 0 deletions. Show diff stats Hide diff stats

  1. +16 0 tests/cases/console/command/HelpTest.php
16 tests/cases/console/command/HelpTest.php
@@ -172,6 +172,22 @@ public function testApiProperties() {
172 172 $result = $help->response->output;
173 173 $this->assertPattern("/{$expected}/s", $result);
174 174 }
  175 +
  176 + /**
  177 + * Tests that the `Help` command prints a class' full description with all lines, not just the
  178 + * first.
  179 + */
  180 + public function testPrintFullClassDoc() {
  181 + $command = new Help(array(
  182 + 'request' => $this->request, 'classes' => $this->classes
  183 + ));
  184 +
  185 + $this->assertTrue($command->run('Create'));
  186 + $lines = explode(PHP_EOL, $command->response->output);
  187 +
  188 + $offset = array_search('DESCRIPTION', $lines);
  189 + $this->assertEqual('OPTIONS', $lines[$offset + 3]);
  190 + }
175 191 }
176 192
177 193 ?>

0 comments on commit 04e20da

Please sign in to comment.
Something went wrong with that request. Please try again.