Skip to content

Commit

Permalink
Add missing doc blcoks.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed May 24, 2015
1 parent 1cec666 commit 31e95ec
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/TestSuite/Stub/ConsoleOutput.php
Expand Up @@ -18,16 +18,44 @@

/**
* StubOutput makes testing shell commands/shell helpers easier.
*
* You can use this class by injecting it into a ConsoleIo instance
* that your command/task/helper uses:
*
* ```
* use Cake\Console\ConsoleIo;
* use Cake\TestSuite\Stub\ConsoleOutput;
*
* $output = new ConsoleOutput();
* $io = new ConsoleIo($output);
* ```
*/
class ConsoleOutput extends ConsoleOutputBase
{
/**
* Buffered messages.
*
* @var array
*/
protected $_out = [];

/**
* Write output to the buffer.
*
* @param string $message The message to write.
* @param int $newlines Unused.
* @return void
*/
public function write($message, $newlines = 1)
{
$this->_out[] = $message;
}

/**
* Get the buffered output.
*
* @return array
*/
public function messages()
{
return $this->_out;
Expand Down

0 comments on commit 31e95ec

Please sign in to comment.