InlineTest.php 535 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace League\CLImate\Tests;
  3. class InlineTest extends TestBase
  4. {
  5. /** @test */
  6. public function it_can_output_inline()
  7. {
  8. $should_be = [
  9. "content1_",
  10. "content2_",
  11. ];
  12. $this->output->shouldReceive("sameLine");
  13. foreach ($should_be as $content) {
  14. $this->shouldWrite("\e[m" . $content . "\e[0m");
  15. }
  16. $this->shouldHavePersisted(2);
  17. foreach ($should_be as $content) {
  18. $this->cli->inline($content);
  19. }
  20. }
  21. }