diff options
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend')
-rw-r--r-- | vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/AbstractPDOTest.php | 21 | ||||
-rw-r--r-- | vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/Mock.php | 3 |
2 files changed, 20 insertions, 4 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/AbstractPDOTest.php b/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/AbstractPDOTest.php index 89f69b10a..b18ab9488 100644 --- a/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/AbstractPDOTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/AbstractPDOTest.php @@ -10,7 +10,7 @@ abstract class AbstractPDOTest extends \PHPUnit\Framework\TestCase { use DAV\DbTestHelperTrait; - public function setUp() + public function setup(): void { $this->dropTables(['principals', 'groupmembers']); $this->createSchema('principals'); @@ -190,7 +190,7 @@ abstract class AbstractPDOTest extends \PHPUnit\Framework\TestCase $this->assertNull($backend->findByUri('http://foo', 'principals')); } - public function testFindByUri() + public function testFindByUriWithMailtoAddress() { $pdo = $this->getPDO(); $backend = new PDO($pdo); @@ -199,4 +199,21 @@ abstract class AbstractPDOTest extends \PHPUnit\Framework\TestCase $backend->findByUri('mailto:user@example.org', 'principals') ); } + + public function testFindByUriWithUri() + { + $pdo = $this->getPDO(); + $backend = new PDO($pdo); + $this->assertEquals( + 'principals/user', + $backend->findByUri('principals/user', 'principals') + ); + } + + public function testFindByUriWithUnknownUri() + { + $pdo = $this->getPDO(); + $backend = new PDO($pdo); + $this->assertNull($backend->findByUri('principals/other', 'principals')); + } } diff --git a/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/Mock.php b/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/Mock.php index 551a77900..5f0434579 100644 --- a/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/Mock.php +++ b/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/Mock.php @@ -126,8 +126,7 @@ class Mock extends AbstractBackend * * Read the PropPatch documentation for more info and examples. * - * @param string $path - * @param \Sabre\DAV\PropPatch $propPatch + * @param string $path */ public function updatePrincipal($path, \Sabre\DAV\PropPatch $propPatch) { |