diff options
author | Jake Nabasny <jake@nabasny.com> | 2023-11-28 11:01:52 -0500 |
---|---|---|
committer | Richard Steinmetz <richard@steinmetz.cloud> | 2024-05-30 12:01:13 +0200 |
commit | f863290572ff91d9a8a8d6cb2ad819964c3a1426 (patch) | |
tree | 389883fb9a18bdb2dbcd466bd0f46fe9ff7b82b8 /apps/dav/tests/unit | |
parent | 57a7f09a722c384cb3940c19ed2d00d5b9ec925c (diff) | |
download | nextcloud-server-f863290572ff91d9a8a8d6cb2ad819964c3a1426.tar.gz nextcloud-server-f863290572ff91d9a8a8d6cb2ad819964c3a1426.zip |
feat(ldap): sync additional properties to profile and SAB
Synced from LDAP to profile:
- Date of birth
Synced from LDAP to SAB (via the profile):
- Biography
- Date of birth
Original code by Jake Nabasny (GitHub: @slapcat)
Co-authored-by: Jake Nabasny <jake@nabasny.com>
Co-authored-by: Richard Steinmetz <richard@steinmetz.cloud>
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Diffstat (limited to 'apps/dav/tests/unit')
-rw-r--r-- | apps/dav/tests/unit/CardDAV/ConverterTest.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/dav/tests/unit/CardDAV/ConverterTest.php b/apps/dav/tests/unit/CardDAV/ConverterTest.php index b2e21583eab..df6489d5053 100644 --- a/apps/dav/tests/unit/CardDAV/ConverterTest.php +++ b/apps/dav/tests/unit/CardDAV/ConverterTest.php @@ -18,6 +18,7 @@ use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserManager; use PHPUnit\Framework\MockObject\MockObject; +use Psr\Log\LoggerInterface; use Test\TestCase; class ConverterTest extends TestCase { @@ -30,12 +31,16 @@ class ConverterTest extends TestCase { /** @var IURLGenerator */ private $urlGenerator; + /** @var LoggerInterface|\PHPUnit\Framework\MockObject\MockObject */ + private $logger; + protected function setUp(): void { parent::setUp(); $this->accountManager = $this->createMock(IAccountManager::class); $this->userManager = $this->createMock(IUserManager::class); $this->urlGenerator = $this->createMock(IURLGenerator::class); + $this->logger = $this->createMock(LoggerInterface::class); } /** @@ -87,7 +92,7 @@ class ConverterTest extends TestCase { $user = $this->getUserMock((string)$displayName, $eMailAddress, $cloudId); $accountManager = $this->getAccountManager($user); - $converter = new Converter($accountManager, $this->userManager, $this->urlGenerator); + $converter = new Converter($accountManager, $this->userManager, $this->urlGenerator, $this->logger); $vCard = $converter->createCardFromUser($user); if ($expectedVCard !== null) { $this->assertInstanceOf('Sabre\VObject\Component\VCard', $vCard); @@ -108,7 +113,7 @@ class ConverterTest extends TestCase { ->willReturn('Manager'); $accountManager = $this->getAccountManager($user); - $converter = new Converter($accountManager, $this->userManager, $this->urlGenerator); + $converter = new Converter($accountManager, $this->userManager, $this->urlGenerator, $this->logger); $vCard = $converter->createCardFromUser($user); $this->compareData( @@ -196,7 +201,7 @@ class ConverterTest extends TestCase { * @param $fullName */ public function testNameSplitter($expected, $fullName): void { - $converter = new Converter($this->accountManager, $this->userManager, $this->urlGenerator); + $converter = new Converter($this->accountManager, $this->userManager, $this->urlGenerator, $this->logger); $r = $converter->splitFullName($fullName); $r = implode(';', $r); $this->assertEquals($expected, $r); |