diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-08-01 15:07:53 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-08-01 15:07:53 +0200 |
commit | cb271b759e27c4c26c0e60b7503350682aca33eb (patch) | |
tree | 8abf40b337b3f195a8bee32e02851a1e430c8c0a /apps | |
parent | f74e89bde5892a68500eeea3fa98a511b1d7f7e9 (diff) | |
download | nextcloud-server-cb271b759e27c4c26c0e60b7503350682aca33eb.tar.gz nextcloud-server-cb271b759e27c4c26c0e60b7503350682aca33eb.zip |
Fix dynamic property creations in test files
This fixes warnings in PHP 8.2
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/lib/DAV/Sharing/Backend.php | 2 | ||||
-rw-r--r-- | apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php | 14 |
2 files changed, 10 insertions, 6 deletions
diff --git a/apps/dav/lib/DAV/Sharing/Backend.php b/apps/dav/lib/DAV/Sharing/Backend.php index 92971992c20..90d2c7ebf82 100644 --- a/apps/dav/lib/DAV/Sharing/Backend.php +++ b/apps/dav/lib/DAV/Sharing/Backend.php @@ -179,7 +179,7 @@ class Backend { while ($row = $result->fetch()) { $p = $this->principalBackend->getPrincipalByPath($row['principaluri']); $shares[] = [ - 'href' => "principal:${row['principaluri']}", + 'href' => "principal:{$row['principaluri']}", 'commonName' => isset($p['{DAV:}displayname']) ? (string)$p['{DAV:}displayname'] : '', 'status' => 1, 'readOnly' => (int) $row['access'] === self::ACCESS_READ, diff --git a/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php b/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php index f2d2014d553..73d21746b64 100644 --- a/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php +++ b/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php @@ -27,7 +27,6 @@ */ namespace OCA\DAV\Tests\unit\CalDAV; -use OC\KnownUser\KnownUserService; use OCA\DAV\CalDAV\CalDavBackend; use OCA\DAV\CalDAV\Proxy\ProxyMapper; use OCA\DAV\Connector\Sabre\Principal; @@ -41,6 +40,8 @@ use OCP\IUserSession; use OCP\L10N\IFactory; use OCP\Security\ISecureRandom; use OCP\Share\IManager as ShareManager; +use OC\KnownUser\KnownUserService; +use PHPUnit\Framework\MockObject\MockObject; use Psr\Log\LoggerInterface; use Sabre\CalDAV\Xml\Property\SupportedCalendarComponentSet; use Sabre\DAV\Xml\Property\Href; @@ -58,15 +59,18 @@ abstract class AbstractCalDavBackend extends TestCase { /** @var CalDavBackend */ protected $backend; - /** @var Principal | \PHPUnit\Framework\MockObject\MockObject */ + /** @var Principal | MockObject */ protected $principal; - /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */ + /** @var IUserManager|MockObject */ protected $userManager; - /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */ + /** @var IGroupManager|MockObject */ protected $groupManager; - /** @var IEventDispatcher|\PHPUnit\Framework\MockObject\MockObject */ + /** @var IEventDispatcher|MockObject */ protected $dispatcher; + + /** @var IConfig | MockObject */ + private $config; /** @var ISecureRandom */ private $random; /** @var LoggerInterface*/ |