ClearTest.php 440 B

1234567891011121314151617181920
  1. <?php
  2. namespace League\CLImate\Tests\TerminalObject\Basic;
  3. use League\CLImate\Tests\TestBase;
  4. class ClearTest extends TestBase
  5. {
  6. /**
  7. * @test
  8. * @doesNotPerformAssertions
  9. */
  10. public function it_can_clear_the_terminal()
  11. {
  12. $this->output->shouldReceive("sameLine")->andReturn(true);
  13. $this->shouldWrite("\e[m\e[H\e[2J\e[0m");
  14. $this->shouldHavePersisted();
  15. $this->cli->clear();
  16. }
  17. }