diff options
author | Benjamin Brahmer <info@b-brahmer.de> | 2023-08-25 09:37:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-25 09:37:29 +0200 |
commit | b99320dd4aa9c5c732d331bd54d65e8010c4662d (patch) | |
tree | 83b50d3fe312224acfc1efed52187d47db3eedf3 /tests | |
parent | caf30017730cd610d4d02d1f3622a1ecf1b560ce (diff) |
Check available compression types of curl (#2328)
Check an use available compression types of curl
use compression when downloading feed logo
Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Unit/Fetcher/FeedFetcherTest.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/Unit/Fetcher/FeedFetcherTest.php b/tests/Unit/Fetcher/FeedFetcherTest.php index 1814a8271..c46a9df7a 100644 --- a/tests/Unit/Fetcher/FeedFetcherTest.php +++ b/tests/Unit/Fetcher/FeedFetcherTest.php @@ -28,11 +28,12 @@ use \OCA\News\Db\Feed; use \OCA\News\Db\Item; use OCA\News\Scraper\Scraper; use OCA\News\Fetcher\FeedFetcher; -use GuzzleHttp\Client; +use OCA\News\Config\FetcherConfig; use OCA\News\Utility\Time; use OCP\IL10N; use OCP\ITempManager; + use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; @@ -108,9 +109,9 @@ class FeedFetcherTest extends TestCase private $scraper; /** - * @var MockObject|Client + * @var MockObject|FetcherConfig */ - private $client; + private $fetcherConfig; //metadata /** @@ -194,7 +195,7 @@ class FeedFetcherTest extends TestCase $this->scraper = $this->getMockBuilder(Scraper::class) ->disableOriginalConstructor() ->getMock(); - $this->client = $this->getMockBuilder(Client::class) + $this->fetcherConfig = $this->getMockBuilder(FetcherConfig::class) ->disableOriginalConstructor() ->getMock(); $this->fetcher = new FeedFetcher( @@ -205,7 +206,7 @@ class FeedFetcherTest extends TestCase $this->ITempManager, $timeFactory, $this->logger, - $this->client + $this->fetcherConfig ); $this->url = 'http://tests/'; |