Fix dynamic property creations in test filestags/v25.0.0beta1
@@ -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, |
@@ -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*/ |
@@ -952,7 +952,7 @@ class Cache implements ICache { | |||
* use the one with the highest id gives the best result with the background scanner, since that is most | |||
* likely the folder where we stopped scanning previously | |||
* | |||
* @return string|bool the path of the folder or false when no folder matched | |||
* @return string|false the path of the folder or false when no folder matched | |||
*/ | |||
public function getIncomplete() { | |||
$query = $this->getQueryBuilder(); |
@@ -267,7 +267,7 @@ class CacheJail extends CacheWrapper { | |||
* use the one with the highest id gives the best result with the background scanner, since that is most | |||
* likely the folder where we stopped scanning previously | |||
* | |||
* @return string|bool the path of the folder or false when no folder matched | |||
* @return string|false the path of the folder or false when no folder matched | |||
*/ | |||
public function getIncomplete() { | |||
// not supported |
@@ -267,7 +267,7 @@ class CacheWrapper extends Cache { | |||
* use the one with the highest id gives the best result with the background scanner, since that is most | |||
* likely the folder where we stopped scanning previously | |||
* | |||
* @return string|bool the path of the folder or false when no folder matched | |||
* @return string|false the path of the folder or false when no folder matched | |||
*/ | |||
public function getIncomplete() { | |||
return $this->getCache()->getIncomplete(); |
@@ -243,7 +243,7 @@ interface ICache { | |||
* use the one with the highest id gives the best result with the background scanner, since that is most | |||
* likely the folder where we stopped scanning previously | |||
* | |||
* @return string|bool the path of the folder or false when no folder matched | |||
* @return string|false the path of the folder or false when no folder matched | |||
* @since 9.0.0 | |||
*/ | |||
public function getIncomplete(); |
@@ -105,6 +105,10 @@ class ManagerTest extends TestCase { | |||
* @var MockObject|Folder | |||
*/ | |||
private $userFolder; | |||
/** | |||
* @var MockObject|IL10N | |||
*/ | |||
private $l10n; | |||
/** | |||
* @var MockObject|IManager | |||
*/ |
@@ -24,6 +24,7 @@ namespace Test\Metadata; | |||
use OC\Metadata\FileMetadataMapper; | |||
use OC\Metadata\FileMetadata; | |||
use PHPUnit\Framework\MockObject\MockObject; | |||
/** | |||
* @group DB | |||
@@ -33,9 +34,12 @@ class FileMetadataMapperTest extends \Test\TestCase { | |||
/** @var IDBConnection */ | |||
protected $connection; | |||
/** @var SystemConfig|\PHPUnit\Framework\MockObject\MockObject */ | |||
/** @var SystemConfig|MockObject */ | |||
protected $config; | |||
/** @var FileMetadataMapper|MockObject */ | |||
protected $mapper; | |||
protected function setUp(): void { | |||
parent::setUp(); | |||
@@ -36,7 +36,6 @@ class RepairMimeTypesTest extends \Test\TestCase { | |||
protected function setUp(): void { | |||
parent::setUp(); | |||
$this->savedMimetypeLoader = \OC::$server->getMimeTypeLoader(); | |||
$this->mimetypeLoader = \OC::$server->getMimeTypeLoader(); | |||
/** @var IConfig | \PHPUnit\Framework\MockObject\MockObject $config */ |
@@ -43,6 +43,8 @@ use OC\Security\CSRF\CsrfTokenManager; | |||
class SessionTest extends \Test\TestCase { | |||
/** @var ITimeFactory|MockObject */ | |||
private $timeFactory; | |||
/** @var IProvider|MockObject */ | |||
private $tokenProvider; | |||
/** @var IConfig|MockObject */ | |||
private $config; | |||
/** @var Throttler|MockObject */ |