aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/AbstractPDOTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/AbstractPDOTest.php')
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/AbstractPDOTest.php21
1 files changed, 19 insertions, 2 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'));
+ }
}