From c5f939d4170344932b66db2e179ebf7cb3407c49 Mon Sep 17 00:00:00 2001 From: Levan Velijanashvili Date: Sun, 4 Dec 2022 05:06:28 +0400 Subject: [PATCH] Reset requests --- tests/CachingTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/CachingTest.php b/tests/CachingTest.php index 03f1ce5..f2cb85b 100644 --- a/tests/CachingTest.php +++ b/tests/CachingTest.php @@ -58,6 +58,7 @@ public function testCacheDisabled(): void public function testRequestCount(): void { + CustomNbgCurrency::$requests = 0; CustomNbgCurrency::enableCaching(); $this->assertEquals(0, CustomNbgCurrency::$requests); @@ -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); } }