You are here

public function SimpleFbConnectUserManagerTest::testDownloadProfilePicWhenUserPicturesNotInUse in Simple FB Connect 8.3

Same name and namespace in other branches
  1. 8.2 tests/src/Unit/SimpleFbConnectUserManagerTest.php \Drupal\Tests\simple_fb_connect\Unit\SimpleFbConnectUserManagerTest::testDownloadProfilePicWhenUserPicturesNotInUse()

Tests downloadProfilePic when user pictures are not enabled.

@covers ::downloadProfilePic @covers ::getPictureDirectory

File

tests/src/Unit/SimpleFbConnectUserManagerTest.php, line 386

Class

SimpleFbConnectUserManagerTest
@coversDefaultClass Drupal\simple_fb_connect\SimpleFbConnectUserManager @group simple_fb_connect

Namespace

Drupal\Tests\simple_fb_connect\Unit

Code

public function testDownloadProfilePicWhenUserPicturesNotInUse() {
  $this->entityFieldManager
    ->expects($this
    ->once())
    ->method('getFieldDefinitions')
    ->with('user', 'user')
    ->willReturn([]);
  $this
    ->assertFalse($this->userManager
    ->subDownloadProfilePic('http://www.example.com/picture.jpg', '1234'));
}