ClearTest.php 338 B

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