InlineTest.php 580 B

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