Skip to content

Commit

Permalink
Reset requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Stichoza committed Dec 4, 2022
1 parent 7fa4dab commit c5f939d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/CachingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public function testCacheDisabled(): void

public function testRequestCount(): void
{
CustomNbgCurrency::$requests = 0;
CustomNbgCurrency::enableCaching();

$this->assertEquals(0, CustomNbgCurrency::$requests);
Expand All @@ -68,13 +69,14 @@ public function testRequestCount(): void

$this->assertEquals(1, CustomNbgCurrency::$requests);

CustomNbgCurrency::$requests = 0;
CustomNbgCurrency::disableCaching();

CustomNbgCurrency::rate('usd');
CustomNbgCurrency::rate('eur');
CustomNbgCurrency::rate('gbp');

$this->assertEquals(4, CustomNbgCurrency::$requests);
$this->assertEquals(3, CustomNbgCurrency::$requests);
}
}

Expand Down

0 comments on commit c5f939d

Please sign in to comment.