Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
e0f32814e3
commit
c007ca624f
679 changed files with 831 additions and 832 deletions
|
@ -39,7 +39,7 @@ class SecurityTest extends TestCase {
|
|||
/** @var IUser|\PHPUnit_Framework_MockObject_MockObject */
|
||||
private $user;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->logger = $this->createMock(ILogger::class);
|
||||
|
|
|
@ -63,7 +63,7 @@ class ListenerTest extends TestCase {
|
|||
/** @var IShareHelper|\PHPUnit_Framework_MockObject_MockObject */
|
||||
protected $shareHelper;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->activityManager = $this->createMock(IManager::class);
|
||||
|
|
|
@ -35,13 +35,13 @@ use Test\TestCase;
|
|||
* @package OCA\Comments\Tests\Unit\AppInfo
|
||||
*/
|
||||
class ApplicationTest extends TestCase {
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
\OC::$server->getUserManager()->createUser('dummy', '456');
|
||||
\OC::$server->getUserSession()->setUser(\OC::$server->getUserManager()->get('dummy'));
|
||||
}
|
||||
|
||||
protected function tearDown() {
|
||||
protected function tearDown(): void {
|
||||
\OC::$server->getUserManager()->get('dummy')->delete();
|
||||
parent::tearDown();
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ class CommentersSorterTest extends TestCase {
|
|||
/** @var CommentersSorter */
|
||||
protected $sorter;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->commentsManager = $this->createMock(ICommentsManager::class);
|
||||
|
|
|
@ -59,7 +59,7 @@ class NotificationsTest extends TestCase {
|
|||
/** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
|
||||
protected $urlGenerator;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->commentsManager = $this->createMock(ICommentsManager::class);
|
||||
|
|
|
@ -40,7 +40,7 @@ class EventHandlerTest extends TestCase {
|
|||
/** @var NotificationListener|\PHPUnit_Framework_MockObject_MockObject */
|
||||
protected $notificationListener;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->activityListener = $this->getMockBuilder(ActivityListener::class)
|
||||
|
|
|
@ -34,7 +34,7 @@ class JSSettingsHelperTest extends TestCase {
|
|||
/** @var JSSettingsHelper */
|
||||
protected $helper;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->c = $this->createMock(IServerContainer::class);
|
||||
|
|
|
@ -46,7 +46,7 @@ class ListenerTest extends TestCase {
|
|||
/** @var Listener */
|
||||
protected $listener;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->notificationManager = $this->createMock(\OCP\Notification\IManager::class);
|
||||
|
|
|
@ -62,7 +62,7 @@ class NotifierTest extends TestCase {
|
|||
/** @var string */
|
||||
protected $lc = 'tlh_KX';
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->l10nFactory = $this->createMock(IFactory::class);
|
||||
|
|
|
@ -40,7 +40,7 @@ class AvatarHomeTest extends TestCase {
|
|||
/** @var IAvatarManager | \PHPUnit_Framework_MockObject_MockObject */
|
||||
private $avatarManager;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->avatarManager = $this->createMock(IAvatarManager::class);
|
||||
$this->home = new AvatarHome(['uri' => 'principals/users/admin'], $this->avatarManager);
|
||||
|
|
|
@ -41,7 +41,7 @@ class CleanupInvitationTokenJobTest extends TestCase {
|
|||
/** @var \OCA\DAV\BackgroundJob\GenerateBirthdayCalendarBackgroundJob */
|
||||
private $backgroundJob;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->dbConnection = $this->createMock(IDBConnection::class);
|
||||
|
|
|
@ -40,7 +40,7 @@ class EventReminderJobTest extends TestCase {
|
|||
/** @var EventReminderJob|\PHPUnit\Framework\MockObject\MockObject */
|
||||
private $backgroundJob;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->reminderService = $this->createMock(ReminderService::class);
|
||||
|
|
|
@ -38,7 +38,7 @@ class GenerateBirthdayCalendarBackgroundJobTest extends TestCase {
|
|||
/** @var \OCA\DAV\BackgroundJob\GenerateBirthdayCalendarBackgroundJob */
|
||||
private $backgroundJob;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->birthdayService = $this->createMock(BirthdayService::class);
|
||||
|
|
|
@ -56,7 +56,7 @@ class RefreshWebcalJobTest extends TestCase {
|
|||
/** @var IJobList | \PHPUnit_Framework_MockObject_MockObject */
|
||||
private $jobList;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->caldavBackend = $this->createMock(CalDavBackend::class);
|
||||
|
|
|
@ -49,7 +49,7 @@ class RegisterRegenerateBirthdayCalendarsTest extends TestCase {
|
|||
/** @var RegisterRegenerateBirthdayCalendars */
|
||||
private $backgroundJob;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->time = $this->createMock(ITimeFactory::class);
|
||||
|
|
|
@ -47,7 +47,7 @@ class UpdateCalendarResourcesRoomsBackgroundJobTest extends TestCase {
|
|||
/** @var CalDavBackend | \PHPUnit_Framework_MockObject_MockObject */
|
||||
private $calDavBackend;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->resourceManager = $this->createMock(IResourceManager::class);
|
||||
|
@ -59,7 +59,7 @@ class UpdateCalendarResourcesRoomsBackgroundJobTest extends TestCase {
|
|||
$this->calDavBackend);
|
||||
}
|
||||
|
||||
protected function tearDown() {
|
||||
protected function tearDown(): void {
|
||||
$query = self::$realDatabase->getQueryBuilder();
|
||||
$query->delete('calendar_resources')->execute();
|
||||
$query->delete('calendar_resources_md')->execute();
|
||||
|
|
|
@ -72,7 +72,7 @@ abstract class AbstractCalDavBackend extends TestCase {
|
|||
const UNIT_TEST_GROUP = 'principals/groups/caldav-unit-test-group';
|
||||
const UNIT_TEST_GROUP2 = 'principals/groups/caldav-unit-test-group2';
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->userManager = $this->createMock(IUserManager::class);
|
||||
|
@ -106,7 +106,7 @@ abstract class AbstractCalDavBackend extends TestCase {
|
|||
$this->cleanUpBackend();
|
||||
}
|
||||
|
||||
public function tearDown() {
|
||||
public function tearDown(): void {
|
||||
$this->cleanUpBackend();
|
||||
parent::tearDown();
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ class BackendTest extends TestCase {
|
|||
/** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
|
||||
protected $userSession;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->activityManager = $this->createMock(IManager::class);
|
||||
$this->groupManager = $this->createMock(IGroupManager::class);
|
||||
|
|
|
@ -37,7 +37,7 @@ class CalendarTest extends TestCase {
|
|||
/** @var IFilter|\PHPUnit_Framework_MockObject_MockObject */
|
||||
protected $filter;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->url = $this->createMock(IURLGenerator::class);
|
||||
$l = $this->createMock(IL10N::class);
|
||||
|
|
|
@ -37,7 +37,7 @@ class TodoTest extends TestCase {
|
|||
/** @var IFilter|\PHPUnit_Framework_MockObject_MockObject */
|
||||
protected $filter;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->url = $this->createMock(IURLGenerator::class);
|
||||
$l = $this->createMock(IL10N::class);
|
||||
|
|
|
@ -43,7 +43,7 @@ class BaseTest extends TestCase {
|
|||
/** @var IProvider|Base|\PHPUnit_Framework_MockObject_MockObject */
|
||||
protected $provider;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->userManager = $this->createMock(IUserManager::class);
|
||||
$this->groupManager = $this->createMock(IGroupManager::class);
|
||||
|
|
|
@ -46,7 +46,7 @@ class EnablePluginTest extends TestCase {
|
|||
|
||||
protected $response;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->server = $this->createMock(\Sabre\DAV\Server::class);
|
||||
|
|
|
@ -39,7 +39,7 @@ class CalendarHomeTest extends TestCase {
|
|||
/** @var CalendarHome */
|
||||
private $calendarHome;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->backend = $this->createMock(CalDavBackend::class);
|
||||
|
|
|
@ -41,7 +41,7 @@ class CalendarImplTest extends \Test\TestCase {
|
|||
/** @var CalDavBackend | \PHPUnit_Framework_MockObject_MockObject */
|
||||
private $backend;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->calendar = $this->createMock(Calendar::class);
|
||||
|
|
|
@ -45,7 +45,7 @@ class CalendarManagerTest extends \Test\TestCase {
|
|||
/** @var CalendarManager */
|
||||
private $manager;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->backend = $this->createMock(CalDavBackend::class);
|
||||
$this->l10n = $this->createMock(IL10N::class);
|
||||
|
|
|
@ -43,7 +43,7 @@ class CalendarTest extends TestCase {
|
|||
/** @var IConfig */
|
||||
protected $config;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->l10n = $this->getMockBuilder(IL10N::class)
|
||||
->disableOriginalConstructor()->getMock();
|
||||
|
|
|
@ -34,7 +34,7 @@ class OutboxTest extends TestCase {
|
|||
/** @var Outbox */
|
||||
private $outbox;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->config = $this->createMock(IConfig::class);
|
||||
|
|
|
@ -30,7 +30,7 @@ class PluginTest extends TestCase {
|
|||
/** @var Plugin */
|
||||
private $plugin;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->plugin = new Plugin();
|
||||
|
|
|
@ -72,7 +72,7 @@ class PublicCalendarRootTest extends TestCase {
|
|||
/** @var ILogger */
|
||||
private $logger;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$db = \OC::$server->getDatabaseConnection();
|
||||
|
@ -108,7 +108,7 @@ class PublicCalendarRootTest extends TestCase {
|
|||
$this->l10n, $this->config);
|
||||
}
|
||||
|
||||
public function tearDown() {
|
||||
public function tearDown(): void {
|
||||
parent::tearDown();
|
||||
|
||||
if (is_null($this->backend)) {
|
||||
|
|
|
@ -48,7 +48,7 @@ class PluginTest extends TestCase {
|
|||
/** @var IURLGenerator | \PHPUnit_Framework_MockObject_MockObject */
|
||||
private $urlGenerator;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->config = $this->getMockBuilder(IConfig::class)->
|
||||
|
|
|
@ -42,7 +42,7 @@ class BackendTest extends TestCase {
|
|||
/** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
|
||||
private $timeFactory;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$query = self::$realDatabase->getQueryBuilder();
|
||||
|
@ -56,7 +56,7 @@ class BackendTest extends TestCase {
|
|||
$this->createRemindersTestSet();
|
||||
}
|
||||
|
||||
protected function tearDown() {
|
||||
protected function tearDown(): void {
|
||||
$query = self::$realDatabase->getQueryBuilder();
|
||||
$query->delete('calendar_reminders')->execute();
|
||||
$query->delete('calendarobjects')->execute();
|
||||
|
|
|
@ -68,7 +68,7 @@ abstract class AbstractNotificationProviderTest extends TestCase {
|
|||
*/
|
||||
protected $user;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->logger = $this->createMock(ILogger::class);
|
||||
|
|
|
@ -61,7 +61,7 @@ class EmailProviderTest extends AbstractNotificationProviderTest {
|
|||
/** @var IMailer|\PHPUnit\Framework\MockObject\MockObject */
|
||||
private $mailer;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->mailer = $this->createMock(IMailer::class);
|
||||
|
|
|
@ -61,7 +61,7 @@ class PushProviderTest extends AbstractNotificationProviderTest {
|
|||
/** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
|
||||
private $timeFactory;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->config = $this->createMock(IConfig::class);
|
||||
|
|
|
@ -41,7 +41,7 @@ class NotificationProviderManagerTest extends TestCase {
|
|||
/**
|
||||
* @throws \OCP\AppFramework\QueryException
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->providerManager = new NotificationProviderManager();
|
||||
|
|
|
@ -50,7 +50,7 @@ class NotifierTest extends TestCase {
|
|||
/** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
|
||||
protected $timeFactory;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->urlGenerator = $this->createMock(IURLGenerator::class);
|
||||
|
|
|
@ -184,7 +184,7 @@ END:VEVENT
|
|||
END:VCALENDAR
|
||||
EOD;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->backend = $this->createMock(Backend::class);
|
||||
|
|
|
@ -64,7 +64,7 @@ abstract class AbstractPrincipalBackendTest extends TestCase {
|
|||
/** @var string */
|
||||
protected $expectedCUType;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->userSession = $this->createMock(IUserSession::class);
|
||||
|
@ -73,7 +73,7 @@ abstract class AbstractPrincipalBackendTest extends TestCase {
|
|||
$this->proxyMapper = $this->createMock(ProxyMapper::class);
|
||||
}
|
||||
|
||||
protected function tearDown() {
|
||||
protected function tearDown(): void {
|
||||
$query = self::$realDatabase->getQueryBuilder();
|
||||
|
||||
$query->delete('calendar_resources')->execute();
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace OCA\DAV\Tests\unit\CalDAV\ResourceBooking;
|
|||
use OCA\DAV\CalDAV\ResourceBooking\ResourcePrincipalBackend;
|
||||
|
||||
Class ResourcePrincipalBackendTest extends AbstractPrincipalBackendTest {
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->principalBackend = new ResourcePrincipalBackend(self::$realDatabase,
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace OCA\DAV\Tests\unit\CalDAV\ResourceBooking;
|
|||
use OCA\DAV\CalDAV\ResourceBooking\RoomPrincipalBackend;
|
||||
|
||||
Class RoomPrincipalBackendTest extends AbstractPrincipalBackendTest {
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->principalBackend = new RoomPrincipalBackend(self::$realDatabase,
|
||||
|
|
|
@ -48,7 +48,7 @@ use Test\TestCase;
|
|||
|
||||
class IMipPluginTest extends TestCase {
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->mailMessage = $this->createMock(IMessage::class);
|
||||
$this->mailMessage->method('setFrom')->willReturn($this->mailMessage);
|
||||
$this->mailMessage->method('setReplyTo')->willReturn($this->mailMessage);
|
||||
|
|
|
@ -36,7 +36,7 @@ class PluginTest extends TestCase {
|
|||
/** @var Server|\PHPUnit_Framework_MockObject_MockObject */
|
||||
private $server;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->server = $this->createMock(Server::class);
|
||||
|
|
|
@ -35,7 +35,7 @@ class SearchPluginTest extends TestCase {
|
|||
/** @var \OCA\DAV\CalDAV\Search\SearchPlugin $plugin */
|
||||
protected $plugin;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->server = $this->createMock(\Sabre\DAV\Server::class);
|
||||
|
|
|
@ -55,7 +55,7 @@ class AddressBookImplTest extends TestCase {
|
|||
/** @var VCard | \PHPUnit_Framework_MockObject_MockObject */
|
||||
private $vCard;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->addressBookInfo = [
|
||||
|
|
|
@ -52,7 +52,7 @@ class BirthdayServiceTest extends TestCase {
|
|||
/** @var IL10N | \PHPUnit_Framework_MockObject_MockObject */
|
||||
private $l10n;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->calDav = $this->createMock(CalDavBackend::class);
|
||||
|
|
|
@ -121,7 +121,7 @@ class CardDavBackendTest extends TestCase {
|
|||
'N:TestNoUID;;;;'.PHP_EOL.
|
||||
'END:VCARD';
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->userManager = $this->createMock(IUserManager::class);
|
||||
|
@ -159,7 +159,7 @@ class CardDavBackendTest extends TestCase {
|
|||
$this->tearDown();
|
||||
}
|
||||
|
||||
public function tearDown() {
|
||||
public function tearDown(): void {
|
||||
parent::tearDown();
|
||||
|
||||
if (is_null($this->backend)) {
|
||||
|
|
|
@ -39,7 +39,7 @@ class ConverterTest extends TestCase {
|
|||
/** @var AccountManager | PHPUnit_Framework_MockObject_MockObject */
|
||||
private $accountManager;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->accountManager = $this->createMock(AccountManager::class);
|
||||
|
|
|
@ -53,7 +53,7 @@ class ImageExportPluginTest extends TestCase {
|
|||
/** @var PhotoCache|\PHPUnit_Framework_MockObject_MockObject */
|
||||
private $cache;
|
||||
|
||||
function setUp() {
|
||||
function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->request = $this->createMock(RequestInterface::class);
|
||||
|
|
|
@ -44,7 +44,7 @@ class PluginTest extends TestCase {
|
|||
/** @var IShareable | \PHPUnit_Framework_MockObject_MockObject */
|
||||
private $book;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
/** @var Auth | \PHPUnit_Framework_MockObject_MockObject $authBackend */
|
||||
|
|
|
@ -46,7 +46,7 @@ class ListCalendarsTest extends TestCase {
|
|||
|
||||
const USERNAME = 'username';
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->userManager = $this->createMock(IUserManager::class);
|
||||
|
|
|
@ -59,7 +59,7 @@ class MoveCalendarTest extends TestCase {
|
|||
/** @var MoveCalendar */
|
||||
private $command;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->userManager = $this->createMock(IUserManager::class);
|
||||
|
|
|
@ -37,7 +37,7 @@ use Test\TestCase;
|
|||
*/
|
||||
class RemoveInvalidSharesTest extends TestCase {
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
$db = \OC::$server->getDatabaseConnection();
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ class CommentsNodeTest extends \Test\TestCase {
|
|||
protected $logger;
|
||||
protected $userSession;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->commentsManager = $this->getMockBuilder(ICommentsManager::class)
|
||||
|
|
|
@ -54,7 +54,7 @@ class CommentsPluginTest extends \Test\TestCase {
|
|||
/** @var CommentsPluginImplementation */
|
||||
private $plugin;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->tree = $this->getMockBuilder(Tree::class)
|
||||
->disableOriginalConstructor()
|
||||
|
|
|
@ -45,7 +45,7 @@ class EntityCollectionTest extends \Test\TestCase {
|
|||
/** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
|
||||
protected $userSession;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->commentsManager = $this->getMockBuilder(ICommentsManager::class)
|
||||
|
|
|
@ -46,7 +46,7 @@ class EntityTypeCollectionTest extends \Test\TestCase {
|
|||
|
||||
protected $childMap = [];
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->commentsManager = $this->getMockBuilder(ICommentsManager::class)
|
||||
|
|
|
@ -53,7 +53,7 @@ class RootCollectionTest extends \Test\TestCase {
|
|||
/** @var \OCP\IUser|\PHPUnit_Framework_MockObject_MockObject */
|
||||
protected $user;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->user = $this->getMockBuilder(IUser::class)
|
||||
|
|
|
@ -54,7 +54,7 @@ class PublicAuthTest extends \Test\TestCase {
|
|||
/** @var string */
|
||||
private $oldUser;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->session = $this->getMockBuilder(ISession::class)
|
||||
|
@ -77,7 +77,7 @@ class PublicAuthTest extends \Test\TestCase {
|
|||
$this->oldUser = \OC_User::getUser();
|
||||
}
|
||||
|
||||
protected function tearDown() {
|
||||
protected function tearDown(): void {
|
||||
\OC_User::setIncognitoMode(false);
|
||||
|
||||
// Set old user
|
||||
|
|
|
@ -60,7 +60,7 @@ class AuthTest extends TestCase {
|
|||
/** @var Throttler */
|
||||
private $throttler;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->session = $this->getMockBuilder(ISession::class)
|
||||
->disableOriginalConstructor()->getMock();
|
||||
|
|
|
@ -45,7 +45,7 @@ class BearerAuthTest extends TestCase {
|
|||
/** @var BearerAuth */
|
||||
private $bearerAuth;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->userSession = $this->createMock(\OC\User\Session::class);
|
||||
|
|
|
@ -42,7 +42,7 @@ class BlockLegacyClientPluginTest extends TestCase {
|
|||
/** @var BlockLegacyClientPlugin */
|
||||
private $blockLegacyClientVersionPlugin;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->config = $this->getMockBuilder(IConfig::class)
|
||||
|
|
|
@ -40,7 +40,7 @@ class CommentsPropertiesPluginTest extends \Test\TestCase {
|
|||
protected $userSession;
|
||||
protected $server;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->commentsManager = $this->getMockBuilder(ICommentsManager::class)
|
||||
|
|
|
@ -45,7 +45,7 @@ class CopyEtagHeaderPluginTest extends TestCase {
|
|||
/** @var Server */
|
||||
private $server;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->server = new \Sabre\DAV\Server();
|
||||
$this->plugin = new CopyEtagHeaderPlugin();
|
||||
|
|
|
@ -67,7 +67,7 @@ class CustomPropertiesBackendTest extends \Test\TestCase {
|
|||
*/
|
||||
private $user;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->server = new \Sabre\DAV\Server();
|
||||
$this->tree = $this->getMockBuilder(Tree::class)
|
||||
|
@ -90,7 +90,7 @@ class CustomPropertiesBackendTest extends \Test\TestCase {
|
|||
);
|
||||
}
|
||||
|
||||
public function tearDown() {
|
||||
public function tearDown(): void {
|
||||
$connection = \OC::$server->getDatabaseConnection();
|
||||
$deleteStatement = $connection->prepare(
|
||||
'DELETE FROM `*PREFIX*properties`' .
|
||||
|
|
|
@ -75,7 +75,7 @@ class DirectoryTest extends \Test\TestCase {
|
|||
/** @var \OC\Files\FileInfo | \PHPUnit_Framework_MockObject_MockObject */
|
||||
private $info;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->view = $this->createMock('OC\Files\View');
|
||||
|
|
|
@ -41,7 +41,7 @@ class DummyGetResponsePluginTest extends TestCase {
|
|||
/** @var DummyGetResponsePlugin */
|
||||
private $dummyGetResponsePlugin;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->dummyGetResponsePlugin = new DummyGetResponsePlugin();
|
||||
|
|
|
@ -44,7 +44,7 @@ class FakeLockerPluginTest extends TestCase {
|
|||
/** @var FakeLockerPlugin */
|
||||
private $fakeLockerPlugin;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->fakeLockerPlugin = new FakeLockerPlugin();
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ class FileTest extends TestCase {
|
|||
/** @var IConfig | \PHPUnit_Framework_MockObject_MockObject */
|
||||
protected $config;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
unset($_SERVER['HTTP_OC_CHUNKED']);
|
||||
unset($_SERVER['CONTENT_LENGTH']);
|
||||
|
@ -78,7 +78,7 @@ class FileTest extends TestCase {
|
|||
$this->config = $this->getMockBuilder('\OCP\IConfig')->getMock();
|
||||
}
|
||||
|
||||
public function tearDown() {
|
||||
public function tearDown(): void {
|
||||
$userManager = \OC::$server->getUserManager();
|
||||
$userManager->get($this->user)->delete();
|
||||
unset($_SERVER['HTTP_OC_CHUNKED']);
|
||||
|
|
|
@ -96,7 +96,7 @@ class FilesPluginTest extends TestCase {
|
|||
*/
|
||||
private $previewManager;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->server = $this->getMockBuilder(Server::class)
|
||||
->disableOriginalConstructor()
|
||||
|
|
|
@ -85,7 +85,7 @@ class FilesReportPluginTest extends \Test\TestCase {
|
|||
/** @var IAppManager|\PHPUnit_Framework_MockObject_MockObject * */
|
||||
private $appManager;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->tree = $this->getMockBuilder(Tree::class)
|
||||
->disableOriginalConstructor()
|
||||
|
|
|
@ -39,7 +39,7 @@ class MaintenancePluginTest extends TestCase {
|
|||
/** @var MaintenancePlugin */
|
||||
private $maintenancePlugin;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->config = $this->getMockBuilder(IConfig::class)->getMock();
|
||||
|
|
|
@ -65,7 +65,7 @@ class PrincipalTest extends TestCase {
|
|||
/** @var ProxyMapper | \PHPUnit_Framework_MockObject_MockObject */
|
||||
private $proxyMapper;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->userManager = $this->createMock(IUserManager::class);
|
||||
$this->groupManager = $this->createMock(IGroupManager::class);
|
||||
$this->shareManager = $this->createMock(IManager::class);
|
||||
|
|
|
@ -35,7 +35,7 @@ use OCP\IConfig;
|
|||
* @package OCA\DAV\Tests\unit\Connector\Sabre\RequestTest
|
||||
*/
|
||||
class PartFileInRootUploadTest extends UploadTest {
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
$config = \OC::$server->getConfig();
|
||||
$mockConfig = $this->getMockBuilder(IConfig::class)
|
||||
->disableOriginalConstructor()
|
||||
|
@ -53,8 +53,8 @@ class PartFileInRootUploadTest extends UploadTest {
|
|||
parent::setUp();
|
||||
}
|
||||
|
||||
protected function tearDown() {
|
||||
protected function tearDown(): void {
|
||||
$this->restoreService('AllConfig');
|
||||
return parent::tearDown();
|
||||
parent::tearDown();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ abstract class RequestTestCase extends TestCase {
|
|||
return $stream;
|
||||
}
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
unset($_SERVER['HTTP_OC_CHUNKED']);
|
||||
|
|
|
@ -66,7 +66,7 @@ class SharesPluginTest extends \Test\TestCase {
|
|||
*/
|
||||
private $plugin;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->server = new \Sabre\DAV\Server();
|
||||
$this->tree = $this->createMock(Tree::class);
|
||||
|
|
|
@ -70,7 +70,7 @@ class TagsPluginTest extends \Test\TestCase {
|
|||
*/
|
||||
private $plugin;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->server = new \Sabre\DAV\Server();
|
||||
$this->tree = $this->getMockBuilder(Tree::class)
|
||||
|
|
|
@ -57,7 +57,7 @@ class BirthdayCalendarControllerTest extends TestCase {
|
|||
/** @var BirthdayCalendarController|\PHPUnit_Framework_MockObject_MockObject */
|
||||
private $controller;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->config = $this->createMock(IConfig::class);
|
||||
|
|
|
@ -59,7 +59,7 @@ class DirectControllerTest extends TestCase {
|
|||
/** @var DirectController */
|
||||
private $controller;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->rootFolder = $this->createMock(IRootFolder::class);
|
||||
|
|
|
@ -52,7 +52,7 @@ class InvitationResponseControllerTest extends TestCase {
|
|||
/** @var InvitationResponseServer|\PHPUnit_Framework_MockObject_MockObject */
|
||||
private $responseServer;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->dbConnection = $this->createMock(IDBConnection::class);
|
||||
|
|
|
@ -45,7 +45,7 @@ class CustomPropertiesBackendTest extends TestCase {
|
|||
/** @var CustomPropertiesBackend | \PHPUnit_Framework_MockObject_MockObject */
|
||||
private $backend;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->tree = $this->createMock(Tree::class);
|
||||
|
|
|
@ -49,7 +49,7 @@ class GroupPrincipalTest extends \Test\TestCase {
|
|||
/** @var GroupPrincipalBackend */
|
||||
private $connector;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->groupManager = $this->createMock(IGroupManager::class);
|
||||
$this->userSession = $this->createMock(IUserSession::class);
|
||||
$this->shareManager = $this->createMock(IManager::class);
|
||||
|
|
|
@ -46,7 +46,7 @@ class HookManagerTest extends TestCase {
|
|||
/** @var EventDispatcherInterface | \PHPUnit_Framework_MockObject_MockObject */
|
||||
private $eventDispatcher;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->eventDispatcher = $this->createMock(EventDispatcherInterface::class);
|
||||
$this->l10n = $this->createMock(IL10N::class);
|
||||
|
|
|
@ -44,7 +44,7 @@ class PluginTest extends TestCase {
|
|||
/** @var IShareable | \PHPUnit_Framework_MockObject_MockObject */
|
||||
private $book;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
/** @var Auth | \PHPUnit_Framework_MockObject_MockObject $authBackend */
|
||||
|
|
|
@ -49,7 +49,7 @@ class DirectFileTest extends TestCase {
|
|||
/** @var DirectFile */
|
||||
private $directFile;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->direct = Direct::fromParams([
|
||||
|
|
|
@ -58,7 +58,7 @@ class DirectHomeTest extends TestCase {
|
|||
/** @var DirectHome */
|
||||
private $directHome;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->directMapper = $this->createMock(DirectMapper::class);
|
||||
|
|
|
@ -72,7 +72,7 @@ class FileSearchBackendTest extends TestCase {
|
|||
/** @var Directory|\PHPUnit_Framework_MockObject_MockObject */
|
||||
private $davFolder;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->user = $this->createMock(IUser::class);
|
||||
|
|
|
@ -48,7 +48,7 @@ class FilesDropPluginTest extends TestCase {
|
|||
/** @var ResponseInterface|\PHPUnit_Framework_MockObject_MockObject */
|
||||
private $response;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->view = $this->createMock(View::class);
|
||||
|
|
|
@ -89,7 +89,7 @@ CREATED:20151214T091032Z
|
|||
END:VEVENT
|
||||
END:VCALENDAR';
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->logger = $this->createMock(ILogger::class);
|
||||
|
|
|
@ -41,7 +41,7 @@ class RefreshWebcalJobRegistrarTest extends TestCase {
|
|||
/** @var RefreshWebcalJobRegistrar */
|
||||
private $migration;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->db = $this->createMock(IDBConnection::class);
|
||||
|
|
|
@ -40,7 +40,7 @@ class RegenerateBirthdayCalendarsTest extends TestCase {
|
|||
/** @var RegenerateBirthdayCalendars */
|
||||
private $migration;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->jobList = $this->createMock(IJobList::class);
|
||||
|
|
|
@ -34,7 +34,7 @@ class AppleProvisioningNodeTest extends TestCase {
|
|||
/** @var AppleProvisioningNode */
|
||||
private $node;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->timeFactory = $this->createMock(ITimeFactory::class);
|
||||
|
|
|
@ -59,7 +59,7 @@ class AppleProvisioningPluginTest extends TestCase {
|
|||
/** @var AppleProvisioningPlugin */
|
||||
protected $plugin;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->server = $this->createMock(\Sabre\DAV\Server::class);
|
||||
|
|
|
@ -35,7 +35,7 @@ class CalDAVSettingsTest extends TestCase {
|
|||
/** @var CalDAVSettings */
|
||||
private $settings;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->config = $this->createMock(IConfig::class);
|
||||
|
|
|
@ -49,7 +49,7 @@ class SystemTagMappingNodeTest extends \Test\TestCase {
|
|||
*/
|
||||
private $user;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->tagManager = $this->getMockBuilder(ISystemTagManager::class)
|
||||
|
|
|
@ -46,7 +46,7 @@ class SystemTagNodeTest extends \Test\TestCase {
|
|||
*/
|
||||
private $user;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->tagManager = $this->getMockBuilder(ISystemTagManager::class)
|
||||
|
|
|
@ -85,7 +85,7 @@ class SystemTagPluginTest extends \Test\TestCase {
|
|||
*/
|
||||
private $plugin;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->tree = $this->getMockBuilder(Tree::class)
|
||||
->disableOriginalConstructor()
|
||||
|
|
|
@ -45,7 +45,7 @@ class SystemTagsByIdCollectionTest extends \Test\TestCase {
|
|||
*/
|
||||
private $user;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->tagManager = $this->getMockBuilder(ISystemTagManager::class)
|
||||
|
|
|
@ -49,7 +49,7 @@ class SystemTagsObjectMappingCollectionTest extends \Test\TestCase {
|
|||
*/
|
||||
private $user;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->tagManager = $this->getMockBuilder(ISystemTagManager::class)
|
||||
|
|
|
@ -54,7 +54,7 @@ class SystemTagsObjectTypeCollectionTest extends \Test\TestCase {
|
|||
*/
|
||||
private $userFolder;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->tagManager = $this->getMockBuilder(ISystemTagManager::class)
|
||||
|
|
|
@ -51,7 +51,7 @@ class ChunkingPluginTest extends TestCase {
|
|||
/** @var ResponseInterface | \PHPUnit_Framework_MockObject_MockObject */
|
||||
private $response;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->server = $this->getMockBuilder('\Sabre\DAV\Server')
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue