function UnishTestCase::tick

8.0.x UnishTestCase.php UnishTestCase::tick()
7.x UnishTestCase.php UnishTestCase::tick()
master UnishTestCase.php UnishTestCase::tick()

Print out a tick mark.

Useful for longer running tests to indicate they're working.

1 call to UnishTestCase::tick()
CommandUnishTestCase::execute in tests/Unish/CommandUnishTestCase.php
Actually runs the command.

File

tests/Unish/UnishTestCase.php, line 114

Namespace

Unish

Class

UnishTestCase

Code

function tick() {
  static $chars = array('/', '-', '\\', '|');
  static $counter = 0;
  // ANSI support is flaky on Win32, so don't try to do ticks there.
  if (!$this->is_windows()) {
    print $chars[($counter++ % 4)] . "\033[1D";
  }
}