From 50dd125d1896bd842978b95ba38cc61f55f3c569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Pimpa=CC=83o?= Date: Fri, 27 Oct 2023 11:58:44 +0100 Subject: [PATCH] fix: abstract endpoint with cache enabled test --- tests/AbstractEndpointTest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/AbstractEndpointTest.php b/tests/AbstractEndpointTest.php index 6513446..c449ab4 100644 --- a/tests/AbstractEndpointTest.php +++ b/tests/AbstractEndpointTest.php @@ -5,6 +5,7 @@ use Nyholm\Psr7\Response; use ProgrammatorDev\SportMonksFootball\Endpoint\AbstractEndpoint; use ProgrammatorDev\SportMonksFootball\SportMonksFootball; +use Psr\Cache\CacheItemInterface; use Psr\Cache\CacheItemPoolInterface; use Psr\Log\LoggerInterface; @@ -17,6 +18,10 @@ public function testAbstractEndpointWithCache() ); $cache = $this->createMock(CacheItemPoolInterface::class); + $cache->method('getItem')->willReturn( + $this->createMock(CacheItemInterface::class) + ); + $cache->expects($this->once())->method('save'); $api = $this->givenApi();