ClearTest.php 383 B

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