From b555b54200fc0416d1fdd43bc61fb40aec7dd493 Mon Sep 17 00:00:00 2001 From: Serban Ghita Date: Tue, 10 Dec 2024 00:06:06 +0200 Subject: [PATCH] Fix lint Signed-off-by: Serban Ghita --- tests/MobileDetectWithCacheTest.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/MobileDetectWithCacheTest.php b/tests/MobileDetectWithCacheTest.php index 02d8c270..e0e7b5ab 100644 --- a/tests/MobileDetectWithCacheTest.php +++ b/tests/MobileDetectWithCacheTest.php @@ -129,6 +129,9 @@ public function testCustomCacheWithInvalidFnThrowsException() $detect->isMobile(); } + /** + * @throws MobileDetectException + */ public function testCustomCacheForConsecutiveCalls() { $cache = new Cache(); @@ -143,6 +146,9 @@ public function testCustomCacheForConsecutiveCalls() $this->assertCount(1, $cache->getKeys()); } + /** + * @throws MobileDetectException + */ public function testGetCacheKeyIsUsedInConsecutiveCallsIfFoundIn() { $cache = $this->getMockBuilder(Cache::class) @@ -151,12 +157,9 @@ public function testGetCacheKeyIsUsedInConsecutiveCallsIfFoundIn() $cache->method('get')->withAnyParameters()->willReturn(new CacheItem('name', 'value')); $cache->method('set')->withAnyParameters()->willReturn(true); - $cache->expects($spy = $this->exactly(2))->method('get'); $cache->expects($spy = $this->never())->method('set'); - - $detect = new MobileDetect($cache); $detect->setUserAgent('iPad; AppleWebKit/533.17.9 Version/5.0.2 Mobile/8C148 Safari/6533.18.5');