Ejemplo n.º 1
0
 /**
  * Tests to make sure we can output a paragraph, properly limited in line length
  *
  * @return  void
  **/
 public function testOutputParagraph()
 {
     $output = new Output();
     $actual = $this->getBuffered(function () use($output) {
         $paragraph = 'PBR cred distillery, meggings farm-to-table craft beer pop-up before they sold out health goth.';
         $paragraph .= ' Crucifix drinking vinegar polaroid tote bag before they sold out, flexitarian plaid taxidermy.';
         $paragraph .= ' 90\'s cold-pressed pour-over pug asymmetrical small batch. Roof party freegan ennui single-ori';
         $paragraph .= 'gin coffee, Thundercats trust fund PBR&B flexitarian seitan kitsch bespoke taxidermy Pitchfork ';
         $paragraph .= 'fixie kogi. Church-key typewriter readymade, Portland 8-bit whatever sriracha tofu blog DIY Aus';
         $paragraph .= 'tin. Street art twee salvia, cray McSweeney\'s put a bird on it trust fund ethical bicycle righ';
         $paragraph .= 'ts pop-up narwhal umami cronut tilde PBR&B. Selfies banjo VHS cardigan farm-to-table.';
         $output->addParagraph($paragraph);
     });
     $expected = '\\033[0mPBR cred distillery, meggings farm-to-table craft beer pop-up before they\\033[0m\\n';
     $expected .= '\\033[0msold out health goth. Crucifix drinking vinegar polaroid tote bag before\\033[0m\\n';
     $expected .= '\\033[0mthey sold out, flexitarian plaid taxidermy. 90\'s cold-pressed pour-over\\033[0m\\n';
     $expected .= '\\033[0mpug asymmetrical small batch. Roof party freegan ennui single-origin coffee,\\033[0m\\n';
     $expected .= '\\033[0mThundercats trust fund PBR&B flexitarian seitan kitsch bespoke taxidermy\\033[0m\\n';
     $expected .= '\\033[0mPitchfork fixie kogi. Church-key typewriter readymade, Portland 8-bit whatever\\033[0m\\n';
     $expected .= '\\033[0msriracha tofu blog DIY Austin. Street art twee salvia, cray McSweeney\'s\\033[0m\\n';
     $expected .= '\\033[0mput a bird on it trust fund ethical bicycle rights pop-up narwhal umami\\033[0m\\n';
     $expected .= '\\033[0mcronut tilde PBR&B. Selfies banjo VHS cardigan farm-to-table.\\033[0m\\n';
     $this->assertEquals($expected, $actual, 'Output did not have the expected string in appropriate paragraph format');
 }