summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2021-01-11 12:31:16 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2021-01-11 12:35:25 +0100
commitbf48bcd0669593a510fceca39d3bbda3c1c01ce5 (patch)
tree20c6c9d3ae56a4345a6fafbc3bd5026504c94194 /tests
parent7646cbf0d2b66e8a0c5bff74ddd5813045b85b84 (diff)
Make sure twitter returns the raw static html page so we can get the profile picture properly
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/Service/Social/TwitterProviderTest.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/unit/Service/Social/TwitterProviderTest.php b/tests/unit/Service/Social/TwitterProviderTest.php
index 55515b0f..fbaf05ca 100644
--- a/tests/unit/Service/Social/TwitterProviderTest.php
+++ b/tests/unit/Service/Social/TwitterProviderTest.php
@@ -29,6 +29,7 @@ use OCP\Http\Client\IResponse;
use OCP\Http\Client\IClientService;
use ChristophWurst\Nextcloud\Testing\TestCase;
use PHPUnit\Framework\MockObject\MockObject;
+use Psr\Log\LoggerInterface;
class TwitterProviderTest extends TestCase {
private $provider;
@@ -36,6 +37,9 @@ class TwitterProviderTest extends TestCase {
/** @var IClientService|MockObject */
private $clientService;
+ /** @var LoggerInterface|MockObject */
+ private $logger;
+
/** @var IClient|MockObject */
private $client;
@@ -45,6 +49,7 @@ class TwitterProviderTest extends TestCase {
protected function setUp(): void {
parent::setUp();
$this->clientService = $this->createMock(IClientService::class);
+ $this->logger = $this->createMock(LoggerInterface::class);
$this->response = $this->createMock(IResponse::class);
$this->client = $this->createMock(IClient::class);
@@ -53,7 +58,8 @@ class TwitterProviderTest extends TestCase {
->willReturn($this->client);
$this->provider = new TwitterProvider(
- $this->clientService
+ $this->clientService,
+ $this->logger
);
}