Skip to content

Commit

Permalink
fucking hell sleeping time
Browse files Browse the repository at this point in the history
  • Loading branch information
godbout committed Aug 1, 2020
1 parent 35751db commit 594f4c2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions tests/Unit/TimerTest.php
Expand Up @@ -47,7 +47,7 @@ public function it_can_know_if_a_timer_is_currently_running()
$this->assertFalse(Timer::running());
$this->assertNotFalse(Timer::start());

sleep(1);
sleep(3);

$this->assertNotFalse(Timer::running());
}
Expand All @@ -60,12 +60,12 @@ public function it_can_stop_a_timer()
{
$timerId = Timer::start();

sleep(1);
sleep(3);

$this->assertNotFalse(Timer::running());
$this->assertTrue(Timer::stop());

sleep(1);
sleep(3);

$this->assertFalse(Timer::running());

Expand All @@ -80,15 +80,15 @@ public function it_can_continue_a_timer()
{
$timerId = Timer::start();

sleep(1);
sleep(3);

$this->assertTrue(Timer::stop());

sleep(1);
sleep(3);

$this->assertNotFalse(Timer::continue($timerId));

sleep(1);
sleep(3);

Workflow::serviceEnabled()->deleteTimer($timerId);
}
Expand Down
14 changes: 7 additions & 7 deletions tests/Unit/TogglTest.php
Expand Up @@ -89,7 +89,7 @@ public function it_can_return_the_list_of_past_timers()
{
$timerId = $this->toggl->startTimer();

sleep(1);
sleep(3);

$latestTimer = $this->toggl->pastTimers()[0];

Expand Down Expand Up @@ -117,7 +117,7 @@ public function it_can_stop_a_timer()

$timerId = $this->toggl->startTimer();

sleep(2);
sleep(3);

$this->assertTrue($this->toggl->stopCurrentTimer());

Expand All @@ -134,7 +134,7 @@ public function it_can_get_the_running_timer()

$timerId = $this->toggl->startTimer();

sleep(1);
sleep(3);

$this->assertNotFalse($this->toggl->runningTimer());
}
Expand All @@ -147,7 +147,7 @@ public function it_can_delete_a_timer()
{
$timerId = $this->toggl->startTimer();

sleep(1);
sleep(3);

$this->assertTrue($this->toggl->deleteTimer($timerId));
}
Expand All @@ -160,17 +160,17 @@ public function it_can_continue_a_timer()
{
$timerId = $this->toggl->startTimer();

sleep(2);
sleep(3);

$this->assertTrue($this->toggl->stopCurrentTimer());

sleep(2);
sleep(3);

$this->assertFalse($this->toggl->runningTimer());

$restartedTimerId = $this->toggl->continueTimer($timerId);

sleep(2);
sleep(3);

$this->assertNotFalse($restartedTimerId);
$this->assertSame($restartedTimerId, $this->toggl->runningTimer());
Expand Down

0 comments on commit 594f4c2

Please sign in to comment.