diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2018-03-15 14:16:43 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2018-04-05 12:38:39 +0200 |
commit | 8fe914f07e1b4d41c02e127e2242e0a770535455 (patch) | |
tree | b101bce725bf2b9a385077008fe4b9999285acb0 /apps/user_ldap/tests/Mapping | |
parent | feef3cbba03c4517b25a60820e8c4534b0a02b67 (diff) | |
download | nextcloud-server-8fe914f07e1b4d41c02e127e2242e0a770535455.tar.gz nextcloud-server-8fe914f07e1b4d41c02e127e2242e0a770535455.zip |
LDAP backend to emit announce and revoke signals on mapping changes
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/user_ldap/tests/Mapping')
-rw-r--r-- | apps/user_ldap/tests/Mapping/AbstractMappingTest.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/apps/user_ldap/tests/Mapping/AbstractMappingTest.php b/apps/user_ldap/tests/Mapping/AbstractMappingTest.php index d3d33a82da9..54d8b49cdc8 100644 --- a/apps/user_ldap/tests/Mapping/AbstractMappingTest.php +++ b/apps/user_ldap/tests/Mapping/AbstractMappingTest.php @@ -235,6 +235,29 @@ abstract class AbstractMappingTest extends \Test\TestCase { } /** + * tests clear() for successful update. + */ + public function testClearCb() { + list($mapper, $data) = $this->initTest(); + + $callbackCalls = 0; + $test = $this; + + $callback = function (string $id) use ($test, &$callbackCalls) { + $test->assertTrue(trim($id) !== ''); + $callbackCalls++; + }; + + $done = $mapper->clearCb($callback, $callback); + $this->assertTrue($done); + $this->assertSame(count($data) * 2, $callbackCalls); + foreach($data as $entry) { + $name = $mapper->getNameByUUID($entry['uuid']); + $this->assertFalse($name); + } + } + + /** * tests getList() method */ public function testList() { |