From 2bb1805a67ce142df51c04ede3cbce8386a25509 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 16 Nov 2021 23:57:12 +0000 Subject: [PATCH] Added profile picture --- src/Object/Api/Twitter/User.php | 2 +- .../FriendSuggest/Factory/FriendSuggestTest.php | 2 +- tests/src/Module/Api/Twitter/ContactEndpointTest.php | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Object/Api/Twitter/User.php b/src/Object/Api/Twitter/User.php index 49e10e77e6..8972d75837 100644 --- a/src/Object/Api/Twitter/User.php +++ b/src/Object/Api/Twitter/User.php @@ -128,7 +128,7 @@ class User extends BaseDataTransferObject $this->favourites_count = 0; $this->verified = $uid != 0; $this->statuses_count = $apcontact['statuses_count'] ?? 0; - $this->profile_banner_url = ''; + $this->profile_banner_url = Contact::getHeaderUrlForId($publicContact['id'], '', $publicContact['updated']); $this->default_profile = false; $this->default_profile_image = false; diff --git a/tests/src/Contact/FriendSuggest/Factory/FriendSuggestTest.php b/tests/src/Contact/FriendSuggest/Factory/FriendSuggestTest.php index 62b90b1cc9..ae795cdc54 100644 --- a/tests/src/Contact/FriendSuggest/Factory/FriendSuggestTest.php +++ b/tests/src/Contact/FriendSuggest/Factory/FriendSuggestTest.php @@ -46,7 +46,7 @@ class FriendSuggestTest extends MockedTest '', '', '', - new \DateTime('now', new \DateTimeZone('URC')), + new \DateTime('now', new \DateTimeZone('UTC')), 28 ), ], diff --git a/tests/src/Module/Api/Twitter/ContactEndpointTest.php b/tests/src/Module/Api/Twitter/ContactEndpointTest.php index 1f309a1260..6a33e8d67f 100644 --- a/tests/src/Module/Api/Twitter/ContactEndpointTest.php +++ b/tests/src/Module/Api/Twitter/ContactEndpointTest.php @@ -226,7 +226,7 @@ class ContactEndpointTest extends FixtureTest ], 'description' => '', 'protected' => false, - 'verified' => false, + 'verified' => true, 'followers_count' => 0, 'friends_count' => 0, 'listed_count' => 0, @@ -234,12 +234,12 @@ class ContactEndpointTest extends FixtureTest 'statuses_count' => 0, 'created_at' => 'Fri Feb 02 00:00:00 +0000 0000', 'profile_banner_url' => '', - 'profile_image_url_https' => '', + 'profile_image_url_https' => 'http://localhost/photo/contact/48/44?ts=-62135596800', 'default_profile' => false, 'default_profile_image' => false, - 'profile_image_url' => '', - 'profile_image_url_profile_size' => '', - 'profile_image_url_large' => '', + 'profile_image_url' => 'http://localhost/photo/contact/48/44?ts=-62135596800', + 'profile_image_url_profile_size' => 'http://localhost/photo/contact/80/44?ts=-62135596800', + 'profile_image_url_large' => 'http://localhost/photo/contact/1024/44?ts=-62135596800', 'utc_offset' => 0, 'time_zone' => 'UTC', 'geo_enabled' => false,