use Test\TestCase;
class SecurityTest extends TestCase {
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
private $logger;
/** @var Security */
private $security;
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject */
private $user;
protected function setUp(): void {
/** @var Listener */
protected $listener;
- /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
protected $activityManager;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
protected $session;
- /** @var IAppManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */
protected $appManager;
- /** @var IMountProviderCollection|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IMountProviderCollection|\PHPUnit\Framework\MockObject\MockObject */
protected $mountProviderCollection;
- /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */
protected $rootFolder;
- /** @var IShareHelper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IShareHelper|\PHPUnit\Framework\MockObject\MockObject */
protected $shareHelper;
protected function setUp(): void {
->method('getObjectType')
->willReturn('files');
- /** @var CommentsEvent|\PHPUnit_Framework_MockObject_MockObject $event */
+ /** @var CommentsEvent|\PHPUnit\Framework\MockObject\MockObject $event */
$event = $this->createMock(CommentsEvent::class);
$event->expects($this->any())
->method('getComment')
->method('getEvent')
->willReturn(CommentsEvent::EVENT_ADD);
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $ownerUser */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $ownerUser */
$ownerUser = $this->createMock(IUser::class);
$ownerUser->expects($this->any())
->method('getUID')
->willReturn('937393');
- /** @var \PHPUnit_Framework_MockObject_MockObject $mount */
+ /** @var \PHPUnit\Framework\MockObject\MockObject $mount */
$mount = $this->createMock(ICachedMountFileInfo::class);
$mount->expects($this->any())
->method('getUser')
->method('getUser')
->willReturn($ownerUser);
- /** @var \PHPUnit_Framework_MockObject_MockObject $activity */
+ /** @var \PHPUnit\Framework\MockObject\MockObject $activity */
$activity = $this->createMock(IEvent::class);
$activity->expects($this->exactly(count($al['users'])))
->method('setAffectedUser');
use Test\TestCase;
class CommentersSorterTest extends TestCase {
- /** @var ICommentsManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICommentsManager|\PHPUnit\Framework\MockObject\MockObject */
protected $commentsManager;
/** @var CommentersSorter */
protected $sorter;
/** @var Notifications */
protected $notificationsController;
- /** @var ICommentsManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICommentsManager|\PHPUnit\Framework\MockObject\MockObject */
protected $commentsManager;
- /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */
protected $rootFolder;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
protected $session;
- /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
protected $notificationManager;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
protected $urlGenerator;
protected function setUp(): void {
/** @var EventHandler */
protected $eventHandler;
- /** @var ActivityListener|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ActivityListener|\PHPUnit\Framework\MockObject\MockObject */
protected $activityListener;
- /** @var NotificationListener|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var NotificationListener|\PHPUnit\Framework\MockObject\MockObject */
protected $notificationListener;
protected function setUp(): void {
}
public function testNotFiles() {
- /** @var IComment|\PHPUnit_Framework_MockObject_MockObject $comment */
+ /** @var IComment|\PHPUnit\Framework\MockObject\MockObject $comment */
$comment = $this->getMockBuilder(IComment::class)->getMock();
$comment->expects($this->once())
->method('getObjectType')
->willReturn('smiles');
- /** @var CommentsEvent|\PHPUnit_Framework_MockObject_MockObject $event */
+ /** @var CommentsEvent|\PHPUnit\Framework\MockObject\MockObject $event */
$event = $this->getMockBuilder(CommentsEvent::class)
->disableOriginalConstructor()
->getMock();
* @param string $eventType
*/
public function testHandled($eventType) {
- /** @var IComment|\PHPUnit_Framework_MockObject_MockObject $comment */
+ /** @var IComment|\PHPUnit\Framework\MockObject\MockObject $comment */
$comment = $this->getMockBuilder(IComment::class)->getMock();
$comment->expects($this->once())
->method('getObjectType')
->willReturn('files');
- /** @var CommentsEvent|\PHPUnit_Framework_MockObject_MockObject $event */
+ /** @var CommentsEvent|\PHPUnit\Framework\MockObject\MockObject $event */
$event = $this->getMockBuilder(CommentsEvent::class)
->disableOriginalConstructor()
->getMock();
use Test\TestCase;
class ListenerTest extends TestCase {
- /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
protected $notificationManager;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
protected $urlGenerator;
/** @var Listener */
* @param string $notificationMethod
*/
public function testEvaluate($eventType, $notificationMethod) {
- /** @var IComment|\PHPUnit_Framework_MockObject_MockObject $comment */
+ /** @var IComment|\PHPUnit\Framework\MockObject\MockObject $comment */
$comment = $this->getMockBuilder(IComment::class)->getMock();
$comment->expects($this->any())
->method('getObjectType')
->method('getId')
->willReturn('1234');
- /** @var CommentsEvent|\PHPUnit_Framework_MockObject_MockObject $event */
+ /** @var CommentsEvent|\PHPUnit\Framework\MockObject\MockObject $event */
$event = $this->getMockBuilder(CommentsEvent::class)
->disableOriginalConstructor()
->getMock();
->method(('getEvent'))
->willReturn($eventType);
- /** @var INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
+ /** @var INotification|\PHPUnit\Framework\MockObject\MockObject $notification */
$notification = $this->getMockBuilder(INotification::class)->getMock();
$notification->expects($this->any())
->method($this->anything())
* @param string $eventType
*/
public function testEvaluateNoMentions($eventType) {
- /** @var IComment|\PHPUnit_Framework_MockObject_MockObject $comment */
+ /** @var IComment|\PHPUnit\Framework\MockObject\MockObject $comment */
$comment = $this->getMockBuilder(IComment::class)->getMock();
$comment->expects($this->any())
->method('getObjectType')
->method('getMentions')
->willReturn([]);
- /** @var CommentsEvent|\PHPUnit_Framework_MockObject_MockObject $event */
+ /** @var CommentsEvent|\PHPUnit\Framework\MockObject\MockObject $event */
$event = $this->getMockBuilder(CommentsEvent::class)
->disableOriginalConstructor()
->getMock();
}
public function testEvaluateUserDoesNotExist() {
- /** @var IComment|\PHPUnit_Framework_MockObject_MockObject $comment */
+ /** @var IComment|\PHPUnit\Framework\MockObject\MockObject $comment */
$comment = $this->getMockBuilder(IComment::class)->getMock();
$comment->expects($this->any())
->method('getObjectType')
->method('getId')
->willReturn('1234');
- /** @var CommentsEvent|\PHPUnit_Framework_MockObject_MockObject $event */
+ /** @var CommentsEvent|\PHPUnit\Framework\MockObject\MockObject $event */
$event = $this->getMockBuilder(CommentsEvent::class)
->disableOriginalConstructor()
->getMock();
->method(('getEvent'))
->willReturn(CommentsEvent::EVENT_ADD);
- /** @var INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
+ /** @var INotification|\PHPUnit\Framework\MockObject\MockObject $notification */
$notification = $this->getMockBuilder(INotification::class)->getMock();
$notification->expects($this->any())
->method($this->anything())
/** @var Notifier */
protected $notifier;
- /** @var IFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IFactory|\PHPUnit\Framework\MockObject\MockObject */
protected $l10nFactory;
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
protected $l;
- /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */
protected $folder;
- /** @var ICommentsManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICommentsManager|\PHPUnit\Framework\MockObject\MockObject */
protected $commentsManager;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
protected $url;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
- /** @var INotification|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var INotification|\PHPUnit\Framework\MockObject\MockObject */
protected $notification;
- /** @var IComment|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IComment|\PHPUnit\Framework\MockObject\MockObject */
protected $comment;
/** @var string */
protected $lc = 'tlh_KX';
$displayName = 'Huraga';
$message = '@Huraga mentioned you in a comment on “Gre\'thor.odp”';
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$user->expects($this->once())
->method('getDisplayName')
->willReturn($displayName);
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $you */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $you */
$you = $this->createMock(IUser::class);
- /** @var Node|\PHPUnit_Framework_MockObject_MockObject $node */
+ /** @var Node|\PHPUnit\Framework\MockObject\MockObject $node */
$node = $this->createMock(Node::class);
$node
->expects($this->atLeastOnce())
$fileName = 'Gre\'thor.odp';
$message = 'You were mentioned on “Gre\'thor.odp”, in a comment by a user that has since been deleted';
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $you */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $you */
$you = $this->createMock(IUser::class);
- /** @var Node|\PHPUnit_Framework_MockObject_MockObject $node */
+ /** @var Node|\PHPUnit\Framework\MockObject\MockObject $node */
$node = $this->createMock(Node::class);
$node
->expects($this->atLeastOnce())
$this->notifier->prepare($this->notification, $this->lc);
}
-
+
public function testPrepareDifferentApp() {
$this->expectException(\InvalidArgumentException::class);
$this->notifier->prepare($this->notification, $this->lc);
}
-
+
public function testPrepareNotFound() {
$this->expectException(\InvalidArgumentException::class);
$this->notifier->prepare($this->notification, $this->lc);
}
-
+
public function testPrepareDifferentSubject() {
$this->expectException(\InvalidArgumentException::class);
$displayName = 'Huraga';
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$user->expects($this->once())
->method('getDisplayName')
$this->notifier->prepare($this->notification, $this->lc);
}
-
+
public function testPrepareNotFiles() {
$this->expectException(\InvalidArgumentException::class);
$displayName = 'Huraga';
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$user->expects($this->once())
->method('getDisplayName')
$this->notifier->prepare($this->notification, $this->lc);
}
-
+
public function testPrepareUnresolvableFileID() {
$this->expectException(\OCP\Notification\AlreadyProcessedException::class);
$displayName = 'Huraga';
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$user->expects($this->once())
->method('getDisplayName')
/** @var AvatarHome */
private $home;
- /** @var IAvatarManager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAvatarManager | \PHPUnit\Framework\MockObject\MockObject */
private $avatarManager;
protected function setUp(): void {
class AvatarNodeTest extends TestCase {
public function testGetName() {
- /** @var IAvatar | \PHPUnit_Framework_MockObject_MockObject $a */
+ /** @var IAvatar | \PHPUnit\Framework\MockObject\MockObject $a */
$a = $this->createMock(IAvatar::class);
$n = new AvatarNode(1024, 'png', $a);
$this->assertEquals('1024.png', $n->getName());
}
public function testGetContentType() {
- /** @var IAvatar | \PHPUnit_Framework_MockObject_MockObject $a */
+ /** @var IAvatar | \PHPUnit\Framework\MockObject\MockObject $a */
$a = $this->createMock(IAvatar::class);
$n = new AvatarNode(1024, 'png', $a);
$this->assertEquals('image/png', $n->getContentType());
class CleanupInvitationTokenJobTest extends TestCase {
- /** @var IDBConnection | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IDBConnection | \PHPUnit\Framework\MockObject\MockObject */
private $dbConnection;
- /** @var ITimeFactory | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITimeFactory | \PHPUnit\Framework\MockObject\MockObject */
private $timeFactory;
/** @var \OCA\DAV\BackgroundJob\GenerateBirthdayCalendarBackgroundJob */
class GenerateBirthdayCalendarBackgroundJobTest extends TestCase {
- /** @var BirthdayService | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var BirthdayService | \PHPUnit\Framework\MockObject\MockObject */
private $birthdayService;
- /** @var IConfig | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject */
private $config;
/** @var \OCA\DAV\BackgroundJob\GenerateBirthdayCalendarBackgroundJob */
class RegisterRegenerateBirthdayCalendarsTest extends TestCase {
- /** @var ITimeFactory | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITimeFactory | \PHPUnit\Framework\MockObject\MockObject */
private $time;
- /** @var IUserManager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager | \PHPUnit\Framework\MockObject\MockObject */
private $userManager;
- /** @var IJobList | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IJobList | \PHPUnit\Framework\MockObject\MockObject */
private $jobList;
- /** @var IConfig | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject */
private $config;
/** @var RegisterRegenerateBirthdayCalendars */
/** @var UpdateCalendarResourcesRoomsBackgroundJob */
private $backgroundJob;
- /** @var IResourceManager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IResourceManager | \PHPUnit\Framework\MockObject\MockObject */
private $resourceManager;
- /** @var IRoomManager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRoomManager | \PHPUnit\Framework\MockObject\MockObject */
private $roomManager;
- /** @var CalDavBackend | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var CalDavBackend | \PHPUnit\Framework\MockObject\MockObject */
private $calDavBackend;
protected function setUp(): void {
/** @var CalDavBackend */
protected $backend;
- /** @var Principal | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var Principal | \PHPUnit\Framework\MockObject\MockObject */
protected $principal;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
- /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */
protected $groupManager;
- /** @var EventDispatcherInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject */
protected $dispatcher;
/** @var ISecureRandom */
class CalendarTest extends TestCase {
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
protected $url;
- /** @var IFilter|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IFilter|\PHPUnit\Framework\MockObject\MockObject */
protected $filter;
protected function setUp(): void {
class TodoTest extends TestCase {
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
protected $url;
- /** @var IFilter|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IFilter|\PHPUnit\Framework\MockObject\MockObject */
protected $filter;
protected function setUp(): void {
class EnablePluginTest extends TestCase {
- /** @var \Sabre\DAV\Server|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \Sabre\DAV\Server|\PHPUnit\Framework\MockObject\MockObject */
protected $server;
- /** @var \OCP\IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var BirthdayService |\PHPUnit_Framework_MockObject_MockObject */
+ /** @var BirthdayService |\PHPUnit\Framework\MockObject\MockObject */
protected $birthdayService;
/** @var \OCA\DAV\CalDAV\BirthdayCalendar\EnablePlugin $plugin */
*/
public function testCalendarSharing($userCanRead, $userCanWrite, $groupCanRead, $groupCanWrite, $add) {
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject $l10n */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject $l10n */
$l10n = $this->createMock(IL10N::class);
$l10n
->expects($this->any())
$calendarInfo = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER)[0];
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject $l10n */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject $l10n */
$l10n = $this->createMock(IL10N::class);
$config = $this->createMock(IConfig::class);
class CalendarHomeTest extends TestCase {
- /** @var CalDavBackend | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var CalDavBackend | \PHPUnit\Framework\MockObject\MockObject */
private $backend;
/** @var array */
}
public function testCreateCalendarValidName() {
- /** @var MkCol | \PHPUnit_Framework_MockObject_MockObject $mkCol */
+ /** @var MkCol | \PHPUnit\Framework\MockObject\MockObject $mkCol */
$mkCol = $this->createMock(MkCol::class);
$mkCol->method('getResourceType')
$this->expectException(\Sabre\DAV\Exception\MethodNotAllowed::class);
$this->expectExceptionMessage('The resource you tried to create has a reserved name');
- /** @var MkCol | \PHPUnit_Framework_MockObject_MockObject $mkCol */
+ /** @var MkCol | \PHPUnit\Framework\MockObject\MockObject $mkCol */
$mkCol = $this->createMock(MkCol::class);
$this->calendarHome->createExtendedCollection('contact_birthdays', $mkCol);
$this->expectException(\Sabre\DAV\Exception\MethodNotAllowed::class);
$this->expectExceptionMessage('The resource you tried to create has a reserved name');
- /** @var MkCol | \PHPUnit_Framework_MockObject_MockObject $mkCol */
+ /** @var MkCol | \PHPUnit\Framework\MockObject\MockObject $mkCol */
$mkCol = $this->createMock(MkCol::class);
$this->calendarHome->createExtendedCollection('app-generated--example--foo-1', $mkCol);
/** @var CalendarImpl */
private $calendarImpl;
- /** @var Calendar | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var Calendar | \PHPUnit\Framework\MockObject\MockObject */
private $calendar;
/** @var array */
private $calendarInfo;
- /** @var CalDavBackend | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var CalDavBackend | \PHPUnit\Framework\MockObject\MockObject */
private $backend;
protected function setUp(): void {
class CalendarManagerTest extends \Test\TestCase {
- /** @var CalDavBackend | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var CalDavBackend | \PHPUnit\Framework\MockObject\MockObject */
private $backend;
- /** @var IL10N | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N | \PHPUnit\Framework\MockObject\MockObject */
private $l10n;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
/** @var CalendarManager */
['id' => 456, 'uri' => 'blablub2'],
]);
- /** @var IManager | \PHPUnit_Framework_MockObject_MockObject $calendarManager */
+ /** @var IManager | \PHPUnit\Framework\MockObject\MockObject $calendarManager */
$calendarManager = $this->createMock(Manager::class);
$calendarManager->expects($this->at(0))
->method('registerCalendar')
}
public function testDelete() {
- /** @var \PHPUnit_Framework_MockObject_MockObject | CalDavBackend $backend */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | CalDavBackend $backend */
$backend = $this->getMockBuilder(CalDavBackend::class)->disableOriginalConstructor()->getMock();
$backend->expects($this->once())->method('updateShares');
$backend->expects($this->any())->method('getShares')->willReturn([
public function testDeleteFromGroup() {
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
- /** @var \PHPUnit_Framework_MockObject_MockObject | CalDavBackend $backend */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | CalDavBackend $backend */
$backend = $this->getMockBuilder(CalDavBackend::class)->disableOriginalConstructor()->getMock();
$backend->expects($this->never())->method('updateShares');
$backend->expects($this->any())->method('getShares')->willReturn([
}
public function testDeleteOwn() {
- /** @var \PHPUnit_Framework_MockObject_MockObject | CalDavBackend $backend */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | CalDavBackend $backend */
$backend = $this->createMock(CalDavBackend::class);
$backend->expects($this->never())->method('updateShares');
$backend->expects($this->never())->method('getShares');
}
public function testDeleteBirthdayCalendar() {
- /** @var \PHPUnit_Framework_MockObject_MockObject | CalDavBackend $backend */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | CalDavBackend $backend */
$backend = $this->createMock(CalDavBackend::class);
$backend->expects($this->once())->method('deleteCalendar')
->with(666);
* @dataProvider dataPropPatch
*/
public function testPropPatch($ownerPrincipal, $principalUri, $mutations, $shared) {
- /** @var \PHPUnit_Framework_MockObject_MockObject | CalDavBackend $backend */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | CalDavBackend $backend */
$backend = $this->getMockBuilder(CalDavBackend::class)->disableOriginalConstructor()->getMock();
$calendarInfo = [
'{http://owncloud.org/ns}owner-principal' => $ownerPrincipal,
* @dataProvider providesReadOnlyInfo
*/
public function testAcl($expectsWrite, $readOnlyValue, $hasOwnerSet, $uri = 'default') {
- /** @var \PHPUnit_Framework_MockObject_MockObject | CalDavBackend $backend */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | CalDavBackend $backend */
$backend = $this->getMockBuilder(CalDavBackend::class)->disableOriginalConstructor()->getMock();
$backend->expects($this->any())->method('applyShareAcl')->willReturnArgument(1);
$calendarInfo = [
$calObject1 = ['uri' => 'event-1', 'classification' => CalDavBackend::CLASSIFICATION_CONFIDENTIAL];
$calObject2 = ['uri' => 'event-2', 'classification' => CalDavBackend::CLASSIFICATION_PRIVATE];
- /** @var \PHPUnit_Framework_MockObject_MockObject | CalDavBackend $backend */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | CalDavBackend $backend */
$backend = $this->getMockBuilder(CalDavBackend::class)->disableOriginalConstructor()->getMock();
$backend->expects($this->any())->method('getCalendarObjects')->willReturn([
$calObject0, $calObject1, $calObject2
$calObject1 = ['uri' => 'event-1', 'classification' => CalDavBackend::CLASSIFICATION_CONFIDENTIAL, 'calendardata' => $calData];
$calObject2 = ['uri' => 'event-2', 'classification' => CalDavBackend::CLASSIFICATION_PRIVATE];
- /** @var \PHPUnit_Framework_MockObject_MockObject | CalDavBackend $backend */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | CalDavBackend $backend */
$backend = $this->getMockBuilder(CalDavBackend::class)->disableOriginalConstructor()->getMock();
$backend->expects($this->any())->method('getCalendarObjects')->willReturn([
$calObject0, $calObject1, $calObject2
'classification' => CalDavBackend::CLASSIFICATION_CONFIDENTIAL,
'calendardata' => $confidentialObjectData];
- /** @var \PHPUnit_Framework_MockObject_MockObject | CalDavBackend $backend */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | CalDavBackend $backend */
$backend = $this->createMock(CalDavBackend::class);
$backend->expects($this->any())
->method('getCalendarObjects')
private $publicCalendarRoot;
/** @var IL10N */
private $l10n;
- /** @var Principal|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Principal|\PHPUnit\Framework\MockObject\MockObject */
private $principal;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
- /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */
protected $groupManager;
/** @var IConfig */
protected $config;
$calObject1 = ['uri' => 'event-1', 'classification' => CalDavBackend::CLASSIFICATION_CONFIDENTIAL];
$calObject2 = ['uri' => 'event-2', 'classification' => CalDavBackend::CLASSIFICATION_PRIVATE];
- /** @var \PHPUnit_Framework_MockObject_MockObject | CalDavBackend $backend */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | CalDavBackend $backend */
$backend = $this->getMockBuilder(CalDavBackend::class)->disableOriginalConstructor()->getMock();
$backend->expects($this->any())->method('getCalendarObjects')->willReturn([
$calObject0, $calObject1, $calObject2
'id' => 666,
'uri' => 'cal',
];
- /** @var \PHPUnit_Framework_MockObject_MockObject | IConfig $config */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | IConfig $config */
$config = $this->createMock(IConfig::class);
$c = new PublicCalendar($backend, $calendarInfo, $this->l10n, $config);
$calObject1 = ['uri' => 'event-1', 'classification' => CalDavBackend::CLASSIFICATION_CONFIDENTIAL, 'calendardata' => $calData];
$calObject2 = ['uri' => 'event-2', 'classification' => CalDavBackend::CLASSIFICATION_PRIVATE];
- /** @var \PHPUnit_Framework_MockObject_MockObject | CalDavBackend $backend */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | CalDavBackend $backend */
$backend = $this->getMockBuilder(CalDavBackend::class)->disableOriginalConstructor()->getMock();
$backend->expects($this->any())->method('getCalendarObjects')->willReturn([
$calObject0, $calObject1, $calObject2
'id' => 666,
'uri' => 'cal',
];
- /** @var \PHPUnit_Framework_MockObject_MockObject | IConfig $config */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | IConfig $config */
$config = $this->createMock(IConfig::class);
$c = new PublicCalendar($backend, $calendarInfo, $this->l10n, $config);
private $plugin;
/** @var Server */
private $server;
- /** @var Calendar | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var Calendar | \PHPUnit\Framework\MockObject\MockObject */
private $book;
- /** @var IConfig | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var IURLGenerator | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator | \PHPUnit\Framework\MockObject\MockObject */
private $urlGenerator;
protected function setUp(): void {
/** @var \OCA\DAV\CalDAV\ResourceBooking\ResourcePrincipalBackend|\OCA\DAV\CalDAV\ResourceBooking\RoomPrincipalBackend */
protected $principalBackend;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
protected $userSession;
- /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */
protected $groupManager;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
protected $logger;
- /** @var ProxyMapper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ProxyMapper|\PHPUnit\Framework\MockObject\MockObject */
protected $proxyMapper;
/** @var string */
/** @var array */
private $addressBookInfo;
- /** @var AddressBook | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var AddressBook | \PHPUnit\Framework\MockObject\MockObject */
private $addressBook;
- /** @var IURLGenerator | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator | \PHPUnit\Framework\MockObject\MockObject */
private $urlGenerator;
- /** @var CardDavBackend | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var CardDavBackend | \PHPUnit\Framework\MockObject\MockObject */
private $backend;
- /** @var VCard | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var VCard | \PHPUnit\Framework\MockObject\MockObject */
private $vCard;
protected function setUp(): void {
public function testSearch() {
- /** @var \PHPUnit_Framework_MockObject_MockObject | AddressBookImpl $addressBookImpl */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | AddressBookImpl $addressBookImpl */
$addressBookImpl = $this->getMockBuilder(AddressBookImpl::class)
->setConstructorArgs(
[
public function testCreate($properties) {
$uid = 'uid';
- /** @var \PHPUnit_Framework_MockObject_MockObject | AddressBookImpl $addressBookImpl */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | AddressBookImpl $addressBookImpl */
$addressBookImpl = $this->getMockBuilder(AddressBookImpl::class)
->setConstructorArgs(
[
$uri = 'bla.vcf';
$properties = ['URI' => $uri, 'UID' => $uid, 'FN' => 'John Doe'];
- /** @var \PHPUnit_Framework_MockObject_MockObject | AddressBookImpl $addressBookImpl */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | AddressBookImpl $addressBookImpl */
$addressBookImpl = $this->getMockBuilder(AddressBookImpl::class)
->setConstructorArgs(
[
}
public function testCreateUid() {
- /** @var \PHPUnit_Framework_MockObject_MockObject | AddressBookImpl $addressBookImpl */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | AddressBookImpl $addressBookImpl */
$addressBookImpl = $this->getMockBuilder(AddressBookImpl::class)
->setConstructorArgs(
[
class AddressBookTest extends TestCase {
public function testDelete() {
- /** @var \PHPUnit_Framework_MockObject_MockObject | CardDavBackend $backend */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | CardDavBackend $backend */
$backend = $this->getMockBuilder(CardDavBackend::class)->disableOriginalConstructor()->getMock();
$backend->expects($this->once())->method('updateShares');
$backend->expects($this->any())->method('getShares')->willReturn([
$c->delete();
}
-
+
public function testDeleteFromGroup() {
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
- /** @var \PHPUnit_Framework_MockObject_MockObject | CardDavBackend $backend */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | CardDavBackend $backend */
$backend = $this->getMockBuilder(CardDavBackend::class)->disableOriginalConstructor()->getMock();
$backend->expects($this->never())->method('updateShares');
$backend->expects($this->any())->method('getShares')->willReturn([
$c->delete();
}
-
+
public function testPropPatch() {
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
- /** @var \PHPUnit_Framework_MockObject_MockObject | CardDavBackend $backend */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | CardDavBackend $backend */
$backend = $this->getMockBuilder(CardDavBackend::class)->disableOriginalConstructor()->getMock();
$calendarInfo = [
'{http://owncloud.org/ns}owner-principal' => 'user1',
* @dataProvider providesReadOnlyInfo
*/
public function testAcl($expectsWrite, $readOnlyValue, $hasOwnerSet) {
- /** @var \PHPUnit_Framework_MockObject_MockObject | CardDavBackend $backend */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | CardDavBackend $backend */
$backend = $this->getMockBuilder(CardDavBackend::class)->disableOriginalConstructor()->getMock();
$backend->expects($this->any())->method('applyShareAcl')->willReturnArgument(1);
$calendarInfo = [
/** @var BirthdayService */
private $service;
- /** @var CalDavBackend | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var CalDavBackend | \PHPUnit\Framework\MockObject\MockObject */
private $calDav;
- /** @var CardDavBackend | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var CardDavBackend | \PHPUnit\Framework\MockObject\MockObject */
private $cardDav;
- /** @var GroupPrincipalBackend | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var GroupPrincipalBackend | \PHPUnit\Framework\MockObject\MockObject */
private $groupPrincipalBackend;
- /** @var IConfig | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var IDBConnection | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IDBConnection | \PHPUnit\Framework\MockObject\MockObject */
private $dbConnection;
- /** @var IL10N | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N | \PHPUnit\Framework\MockObject\MockObject */
private $l10n;
protected function setUp(): void {
$this->cardDav->expects($this->once())->method('getShares')->willReturn([]);
$this->calDav->expects($this->never())->method('getCalendarByUri');
- /** @var BirthdayService | \PHPUnit_Framework_MockObject_MockObject $service */
+ /** @var BirthdayService | \PHPUnit\Framework\MockObject\MockObject $service */
$service = $this->getMockBuilder(BirthdayService::class)
->setMethods(['buildDateFromContact', 'birthdayEvenChanged'])
->setConstructorArgs([$this->calDav, $this->cardDav, $this->groupPrincipalBackend, $this->config, $this->dbConnection, $this->l10n])
]);
$this->cardDav->expects($this->once())->method('getShares')->willReturn([]);
- /** @var BirthdayService | \PHPUnit_Framework_MockObject_MockObject $service */
+ /** @var BirthdayService | \PHPUnit\Framework\MockObject\MockObject $service */
$service = $this->getMockBuilder(BirthdayService::class)
->setMethods(['buildDateFromContact', 'birthdayEvenChanged'])
->setConstructorArgs([$this->calDav, $this->cardDav, $this->groupPrincipalBackend, $this->config, $this->dbConnection, $this->l10n])
/** @var CardDavBackend */
private $backend;
- /** @var Principal | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var Principal | \PHPUnit\Framework\MockObject\MockObject */
private $principal;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
private $userManager;
- /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */
private $groupManager;
- /** @var EventDispatcherInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject */
private $dispatcher;
/** @var IDBConnection */
public function testCardOperations() {
- /** @var CardDavBackend | \PHPUnit_Framework_MockObject_MockObject $backend */
+ /** @var CardDavBackend | \PHPUnit\Framework\MockObject\MockObject $backend */
$backend = $this->getMockBuilder(CardDavBackend::class)
->setConstructorArgs([$this->db, $this->principal, $this->userManager, $this->groupManager, $this->dispatcher])
->setMethods(['updateProperties', 'purgeProperties'])->getMock();
class ContactsManagerTest extends TestCase {
public function test() {
- /** @var IManager | \PHPUnit_Framework_MockObject_MockObject $cm */
+ /** @var IManager | \PHPUnit\Framework\MockObject\MockObject $cm */
$cm = $this->getMockBuilder(IManager::class)->disableOriginalConstructor()->getMock();
$cm->expects($this->exactly(2))->method('registerAddressBook');
$urlGenerator = $this->getMockBuilder(IURLGenerator::class)->disableOriginalConstructor()->getMock();
- /** @var CardDavBackend | \PHPUnit_Framework_MockObject_MockObject $backEnd */
+ /** @var CardDavBackend | \PHPUnit\Framework\MockObject\MockObject $backEnd */
$backEnd = $this->getMockBuilder(CardDavBackend::class)->disableOriginalConstructor()->getMock();
$backEnd->method('getAddressBooksForUser')->willReturn([
['{DAV:}displayname' => 'Test address book', 'uri' => 'default'],
use OCA\DAV\CardDAV\Converter;
use OCP\IImage;
use OCP\IUser;
-use PHPUnit_Framework_MockObject_MockObject;
use Test\TestCase;
class ConverterTest extends TestCase {
- /** @var AccountManager | PHPUnit_Framework_MockObject_MockObject */
+ /** @var AccountManager | \PHPUnit\Framework\MockObject\MockObject */
private $accountManager;
protected function setUp(): void {
* @param $displayName
* @param $eMailAddress
* @param $cloudId
- * @return IUser | PHPUnit_Framework_MockObject_MockObject
+ * @return IUser | \PHPUnit\Framework\MockObject\MockObject
*/
protected function getUserMock($displayName, $eMailAddress, $cloudId) {
$image0 = $this->getMockBuilder(IImage::class)->disableOriginalConstructor()->getMock();
class ImageExportPluginTest extends TestCase {
- /** @var ResponseInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ResponseInterface|\PHPUnit\Framework\MockObject\MockObject */
private $response;
- /** @var RequestInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var RequestInterface|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var ImageExportPlugin|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ImageExportPlugin|\PHPUnit\Framework\MockObject\MockObject */
private $plugin;
/** @var Server */
private $server;
- /** @var Tree|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Tree|\PHPUnit\Framework\MockObject\MockObject */
private $tree;
- /** @var PhotoCache|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var PhotoCache|\PHPUnit\Framework\MockObject\MockObject */
private $cache;
protected function setUp(): void {
private $plugin;
/** @var Server */
private $server;
- /** @var IShareable | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IShareable | \PHPUnit\Framework\MockObject\MockObject */
private $book;
protected function setUp(): void {
parent::setUp();
- /** @var Auth | \PHPUnit_Framework_MockObject_MockObject $authBackend */
+ /** @var Auth | \PHPUnit\Framework\MockObject\MockObject $authBackend */
$authBackend = $this->getMockBuilder(Auth::class)->disableOriginalConstructor()->getMock();
$authBackend->method('isDavAuthenticated')->willReturn(true);
}
public function testEnsureSystemAddressBookExists() {
- /** @var CardDavBackend | \PHPUnit_Framework_MockObject_MockObject $backend */
+ /** @var CardDavBackend | \PHPUnit\Framework\MockObject\MockObject $backend */
$backend = $this->getMockBuilder(CardDavBackend::class)->disableOriginalConstructor()->getMock();
$backend->expects($this->exactly(1))->method('createAddressBook');
$backend->expects($this->at(0))->method('getAddressBooksByUri')->willReturn(null);
* @return void
*/
public function testUpdateAndDeleteUser($activated, $createCalls, $updateCalls, $deleteCalls) {
- /** @var CardDavBackend | \PHPUnit_Framework_MockObject_MockObject $backend */
+ /** @var CardDavBackend | \PHPUnit\Framework\MockObject\MockObject $backend */
$backend = $this->getMockBuilder(CardDavBackend::class)->disableOriginalConstructor()->getMock();
$logger = $this->getMockBuilder(ILogger::class)->disableOriginalConstructor()->getMock();
->with('principals/system/system', 'system')
->willReturn(['id' => -1]);
- /** @var IUserManager | \PHPUnit_Framework_MockObject_MockObject $userManager */
+ /** @var IUserManager | \PHPUnit\Framework\MockObject\MockObject $userManager */
$userManager = $this->getMockBuilder(IUserManager::class)->disableOriginalConstructor()->getMock();
- /** @var IUser | \PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser | \PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->getMockBuilder(IUser::class)->disableOriginalConstructor()->getMock();
$user->method('getBackendClassName')->willReturn('unittest');
$user->method('getUID')->willReturn('test-user');
* @param int $createCount
* @param int $updateCount
* @param int $deleteCount
- * @return \PHPUnit_Framework_MockObject_MockObject
+ * @return \PHPUnit\Framework\MockObject\MockObject
*/
private function getBackendMock($createCount, $updateCount, $deleteCount) {
$backend = $this->getMockBuilder(CardDavBackend::class)
/**
* @param $backend
* @param $response
- * @return SyncService|\PHPUnit_Framework_MockObject_MockObject
+ * @return SyncService|\PHPUnit\Framework\MockObject\MockObject
*/
private function getSyncServiceMock($backend, $response) {
$userManager = $this->getMockBuilder(IUserManager::class)->disableOriginalConstructor()->getMock();
$logger = $this->getMockBuilder(ILogger::class)->disableOriginalConstructor()->getMock();
$accountManager = $this->getMockBuilder(AccountManager::class)->disableOriginalConstructor()->getMock();
- /** @var SyncService | \PHPUnit_Framework_MockObject_MockObject $ss */
+ /** @var SyncService | \PHPUnit\Framework\MockObject\MockObject $ss */
$ss = $this->getMockBuilder(SyncService::class)
->setMethods(['ensureSystemAddressBookExists', 'requestSyncReport', 'download', 'getCertPath'])
->setConstructorArgs([$backend, $userManager, $logger, $accountManager])
/** @var \OCP\IGroupManager|\PHPUnit\Framework\MockObject\MockObject $groupManager */
private $groupManager;
- /** @var \OCP\Share\IManager|\PHPUnit_Framework_MockObject_MockObject $shareManager */
+ /** @var \OCP\Share\IManager|\PHPUnit\Framework\MockObject\MockObject $shareManager */
private $shareManager;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject $l10n */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject $l10n */
private $config;
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject $l10n */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject $l10n */
private $l10n;
- /** @var CalDavBackend|\PHPUnit_Framework_MockObject_MockObject $l10n */
+ /** @var CalDavBackend|\PHPUnit\Framework\MockObject\MockObject $l10n */
private $calDav;
/** @var MoveCalendar */
public function test() {
$db = \OC::$server->getDatabaseConnection();
- /** @var Principal | \PHPUnit_Framework_MockObject_MockObject $principal */
+ /** @var Principal | \PHPUnit\Framework\MockObject\MockObject $principal */
$principal = $this->createMock(Principal::class);
- /** @var IOutput | \PHPUnit_Framework_MockObject_MockObject $output */
+ /** @var IOutput | \PHPUnit\Framework\MockObject\MockObject $output */
$output = $this->createMock(IOutput::class);
$repair = new RemoveInvalidShares($db, $principal);
class CommentsNodeTest extends \Test\TestCase {
- /** @var ICommentsManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICommentsManager|\PHPUnit\Framework\MockObject\MockObject */
protected $commentsManager;
protected $comment;
class EntityCollectionTest extends \Test\TestCase {
- /** @var \OCP\Comments\ICommentsManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\Comments\ICommentsManager|\PHPUnit\Framework\MockObject\MockObject */
protected $commentsManager;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
protected $logger;
/** @var EntityCollection */
protected $collection;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
protected $userSession;
protected function setUp(): void {
$this->assertTrue($node instanceof \OCA\DAV\Comments\CommentNode);
}
-
+
public function testGetChildException() {
$this->expectException(\Sabre\DAV\Exception\NotFound::class);
class EntityTypeCollectionTest extends \Test\TestCase {
- /** @var ICommentsManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICommentsManager|\PHPUnit\Framework\MockObject\MockObject */
protected $commentsManager;
- /** @var \OCP\IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IUserManager|\PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
- /** @var \OCP\ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\ILogger|\PHPUnit\Framework\MockObject\MockObject */
protected $logger;
/** @var \OCA\DAV\Comments\EntityTypeCollection */
protected $collection;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
protected $userSession;
protected $childMap = [];
$this->assertTrue($ec instanceof EntityCollectionImplemantation);
}
-
+
public function testGetChildException() {
$this->expectException(\Sabre\DAV\Exception\NotFound::class);
$this->collection->getChild('17');
}
-
+
public function testGetChildren() {
$this->expectException(\Sabre\DAV\Exception\MethodNotAllowed::class);
class RootCollectionTest extends \Test\TestCase {
- /** @var \OCP\Comments\ICommentsManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\Comments\ICommentsManager|\PHPUnit\Framework\MockObject\MockObject */
protected $commentsManager;
- /** @var \OCP\IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IUserManager|\PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
- /** @var \OCP\ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\ILogger|\PHPUnit\Framework\MockObject\MockObject */
protected $logger;
/** @var \OCA\DAV\Comments\RootCollection */
protected $collection;
- /** @var \OCP\IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IUserSession|\PHPUnit\Framework\MockObject\MockObject */
protected $userSession;
/** @var EventDispatcherInterface */
protected $dispatcher;
- /** @var \OCP\IUser|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IUser|\PHPUnit\Framework\MockObject\MockObject */
protected $user;
protected function setUp(): void {
});
}
-
+
public function testCreateFile() {
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
$this->collection->createFile('foo');
}
-
+
public function testCreateDirectory() {
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
$this->assertTrue($etc instanceof EntityTypeCollectionImplementation);
}
-
+
public function testGetChildInvalid() {
$this->expectException(\Sabre\DAV\Exception\NotFound::class);
$this->collection->getChild('robots');
}
-
+
public function testGetChildNoAuth() {
$this->expectException(\Sabre\DAV\Exception\NotAuthenticated::class);
}
}
-
+
public function testGetChildrenNoAuth() {
$this->expectException(\Sabre\DAV\Exception\NotAuthenticated::class);
$this->assertFalse($this->collection->childExists('robots'));
}
-
+
public function testChildExistsNoAuth() {
$this->expectException(\Sabre\DAV\Exception\NotAuthenticated::class);
$this->collection->childExists('files');
}
-
+
public function testDelete() {
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
$this->assertSame('comments', $this->collection->getName());
}
-
+
public function testSetName() {
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
*/
class PublicAuthTest extends \Test\TestCase {
- /** @var ISession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISession|\PHPUnit\Framework\MockObject\MockObject */
private $session;
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
private $shareManager;
/** @var \OCA\DAV\Connector\PublicAuth */
private $auth;
* @group DB
*/
class BearerAuthTest extends TestCase {
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
private $userSession;
- /** @var ISession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISession|\PHPUnit\Framework\MockObject\MockObject */
private $session;
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
/** @var BearerAuth */
private $bearerAuth;
}
public function testChallenge() {
- /** @var \PHPUnit_Framework_MockObject_MockObject|RequestInterface $request */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|RequestInterface $request */
$request = $this->createMock(RequestInterface::class);
- /** @var \PHPUnit_Framework_MockObject_MockObject|ResponseInterface $response */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|ResponseInterface $response */
$response = $this->createMock(ResponseInterface::class);
$result = $this->bearerAuth->challenge($request, $response);
$this->assertEmpty($result);
use OCA\DAV\Connector\Sabre\BlockLegacyClientPlugin;
use OCP\IConfig;
-use PHPUnit_Framework_MockObject_MockObject;
use Test\TestCase;
/**
* @package OCA\DAV\Tests\unit\Connector\Sabre
*/
class BlockLegacyClientPluginTest extends TestCase {
- /** @var IConfig | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject */
private $config;
/** @var BlockLegacyClientPlugin */
private $blockLegacyClientVersionPlugin;
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
$this->expectExceptionMessage('Unsupported client version.');
- /** @var \Sabre\HTTP\RequestInterface | PHPUnit_Framework_MockObject_MockObject $request */
+ /** @var \Sabre\HTTP\RequestInterface | \PHPUnit\Framework\MockObject\MockObject $request */
$request = $this->createMock('\Sabre\HTTP\RequestInterface');
$request
->expects($this->once())
* @param string $userAgent
*/
public function testBeforeHandlerSuccess($userAgent) {
- /** @var \Sabre\HTTP\RequestInterface | PHPUnit_Framework_MockObject_MockObject $request */
+ /** @var \Sabre\HTTP\RequestInterface | \PHPUnit\Framework\MockObject\MockObject $request */
$request = $this->createMock('\Sabre\HTTP\RequestInterface');
$request
->expects($this->once())
}
public function testBeforeHandlerNoUserAgent() {
- /** @var \Sabre\HTTP\RequestInterface | PHPUnit_Framework_MockObject_MockObject $request */
+ /** @var \Sabre\HTTP\RequestInterface | \PHPUnit\Framework\MockObject\MockObject $request */
$request = $this->createMock('\Sabre\HTTP\RequestInterface');
$request
->expects($this->once())
*/
class DirectoryTest extends \Test\TestCase {
- /** @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject */
private $view;
- /** @var \OC\Files\FileInfo | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC\Files\FileInfo | \PHPUnit\Framework\MockObject\MockObject */
private $info;
protected function setUp(): void {
use OC\SystemConfig;
use OCA\DAV\Connector\Sabre\Exception\InvalidPath;
use OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin as PluginToTest;
-use PHPUnit_Framework_MockObject_MockObject;
use Sabre\DAV\Exception\NotFound;
use Sabre\DAV\Exception\ServiceUnavailable;
use Sabre\DAV\Server;
/** @var PluginToTest */
private $plugin;
- /** @var TestLogger | PHPUnit_Framework_MockObject_MockObject */
+ /** @var TestLogger | \PHPUnit\Framework\MockObject\MockObject */
private $logger;
private function init() {
*/
private $user;
- /** @var IConfig | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject */
protected $config;
protected function setUp(): void {
}
/**
- * @return \PHPUnit_Framework_MockObject_MockObject|Storage
+ * @return \PHPUnit\Framework\MockObject\MockObject|Storage
*/
private function getMockStorage() {
$storage = $this->getMockBuilder(Storage::class)
->setConstructorArgs([['datadir' => \OC::$server->getTempManager()->getTemporaryFolder()]])
->getMock();
\OC\Files\Filesystem::mount($storage, [], $this->user . '/');
- /** @var View | \PHPUnit_Framework_MockObject_MockObject $view */
+ /** @var View | \PHPUnit\Framework\MockObject\MockObject $view */
$view = $this->getMockBuilder(View::class)
->setMethods(['getRelativePath', 'resolvePath'])
->getMock();
null
);
- /** @var \OCA\DAV\Connector\Sabre\File | \PHPUnit_Framework_MockObject_MockObject $file */
+ /** @var \OCA\DAV\Connector\Sabre\File | \PHPUnit\Framework\MockObject\MockObject $file */
$file = $this->getMockBuilder(\OCA\DAV\Connector\Sabre\File::class)
->setConstructorArgs([$view, $info, null, $request])
->setMethods(['header'])
$file->setName('/super*star.txt');
}
-
+
public function testUploadAbort() {
// setup
$view = $this->getMockBuilder(View::class)
$this->assertEmpty($this->listPartFiles($view, ''), 'No stray part files');
}
-
+
public function testDeleteWhenAllowed() {
// setup
$view = $this->getMockBuilder(View::class)
$file->delete();
}
-
+
public function testDeleteThrowsWhenDeletionNotAllowed() {
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
$file->delete();
}
-
+
public function testDeleteThrowsWhenDeletionFailed() {
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
$file->delete();
}
-
+
public function testDeleteThrowsWhenDeletionThrows() {
$this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class);
];
}
-
+
public function testGetFopenFails() {
$this->expectException(\Sabre\DAV\Exception\ServiceUnavailable::class);
$file->get();
}
-
+
public function testGetFopenThrows() {
$this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class);
$file->get();
}
-
+
public function testGetThrowsIfNoPermission() {
$this->expectException(\Sabre\DAV\Exception\NotFound::class);
public const HAS_PREVIEW_PROPERTYNAME = FilesPlugin::HAS_PREVIEW_PROPERTYNAME;
/**
- * @var \Sabre\DAV\Server | \PHPUnit_Framework_MockObject_MockObject
+ * @var \Sabre\DAV\Server | \PHPUnit\Framework\MockObject\MockObject
*/
private $server;
/**
- * @var \Sabre\DAV\Tree | \PHPUnit_Framework_MockObject_MockObject
+ * @var \Sabre\DAV\Tree | \PHPUnit\Framework\MockObject\MockObject
*/
private $tree;
private $plugin;
/**
- * @var \OCP\IConfig | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OCP\IConfig | \PHPUnit\Framework\MockObject\MockObject
*/
private $config;
/**
- * @var \OCP\IRequest | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OCP\IRequest | \PHPUnit\Framework\MockObject\MockObject
*/
private $request;
/**
- * @var \OCP\IPreview | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OCP\IPreview | \PHPUnit\Framework\MockObject\MockObject
*/
private $previewManager;
/**
* @param string $class
- * @return \PHPUnit_Framework_MockObject_MockObject
+ * @return \PHPUnit\Framework\MockObject\MockObject
*/
private function createTestNode($class, $path = '/dummypath') {
$node = $this->getMockBuilder($class)
}
public function testGetPropertiesForFile() {
- /** @var \OCA\DAV\Connector\Sabre\File | \PHPUnit_Framework_MockObject_MockObject $node */
+ /** @var \OCA\DAV\Connector\Sabre\File | \PHPUnit\Framework\MockObject\MockObject $node */
$node = $this->createTestNode('\OCA\DAV\Connector\Sabre\File');
$propFind = new PropFind(
}
public function testGetPropertiesStorageNotAvailable() {
- /** @var \OCA\DAV\Connector\Sabre\File | \PHPUnit_Framework_MockObject_MockObject $node */
+ /** @var \OCA\DAV\Connector\Sabre\File | \PHPUnit\Framework\MockObject\MockObject $node */
$node = $this->createTestNode('\OCA\DAV\Connector\Sabre\File');
$propFind = new PropFind(
0
);
- /** @var \OCA\DAV\Connector\Sabre\File | \PHPUnit_Framework_MockObject_MockObject $node */
+ /** @var \OCA\DAV\Connector\Sabre\File | \PHPUnit\Framework\MockObject\MockObject $node */
$node = $this->createTestNode('\OCA\DAV\Connector\Sabre\File');
$node->expects($this->any())
->method('getDavPermissions')
}
public function testGetPropertiesForDirectory() {
- /** @var \OCA\DAV\Connector\Sabre\Directory | \PHPUnit_Framework_MockObject_MockObject $node */
+ /** @var \OCA\DAV\Connector\Sabre\Directory | \PHPUnit\Framework\MockObject\MockObject $node */
$node = $this->createTestNode('\OCA\DAV\Connector\Sabre\Directory');
$propFind = new PropFind(
}
public function testGetPropertiesForRootDirectory() {
- /** @var \OCA\DAV\Connector\Sabre\Directory|\PHPUnit_Framework_MockObject_MockObject $node */
+ /** @var \OCA\DAV\Connector\Sabre\Directory|\PHPUnit\Framework\MockObject\MockObject $node */
$node = $this->getMockBuilder(Directory::class)
->disableOriginalConstructor()
->getMock();
// But we still want to load the directory list, so this is okay for us.
// $this->expectException(\Sabre\DAV\Exception\NotFound::class);
- /** @var \OCA\DAV\Connector\Sabre\Directory|\PHPUnit_Framework_MockObject_MockObject $node */
+ /** @var \OCA\DAV\Connector\Sabre\Directory|\PHPUnit\Framework\MockObject\MockObject $node */
$node = $this->getMockBuilder(Directory::class)
->disableOriginalConstructor()
->getMock();
$this->plugin->checkMove('FolderA/test.txt', 'test.txt');
}
-
+
public function testMoveSrcNotExist() {
$this->expectException(\Sabre\DAV\Exception\NotFound::class);
$this->expectExceptionMessage('FolderA/test.txt does not exist');
}
public function testHasPreview() {
- /** @var \OCA\DAV\Connector\Sabre\Directory | \PHPUnit_Framework_MockObject_MockObject $node */
+ /** @var \OCA\DAV\Connector\Sabre\Directory | \PHPUnit\Framework\MockObject\MockObject $node */
$node = $this->createTestNode('\OCA\DAV\Connector\Sabre\Directory');
$propFind = new PropFind(
use Sabre\HTTP\ResponseInterface;
class FilesReportPluginTest extends \Test\TestCase {
- /** @var \Sabre\DAV\Server|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \Sabre\DAV\Server|\PHPUnit\Framework\MockObject\MockObject */
private $server;
- /** @var \Sabre\DAV\Tree|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \Sabre\DAV\Tree|\PHPUnit\Framework\MockObject\MockObject */
private $tree;
- /** @var ISystemTagObjectMapper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISystemTagObjectMapper|\PHPUnit\Framework\MockObject\MockObject */
private $tagMapper;
- /** @var ISystemTagManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISystemTagManager|\PHPUnit\Framework\MockObject\MockObject */
private $tagManager;
- /** @var ITags|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITags|\PHPUnit\Framework\MockObject\MockObject */
private $privateTags;
/** @var \OCP\IUserSession */
/** @var FilesReportPluginImplementation */
private $plugin;
- /** @var View|\PHPUnit_Framework_MockObject_MockObject **/
+ /** @var View|\PHPUnit\Framework\MockObject\MockObject **/
private $view;
- /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject **/
+ /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject **/
private $groupManager;
- /** @var Folder|\PHPUnit_Framework_MockObject_MockObject **/
+ /** @var Folder|\PHPUnit\Framework\MockObject\MockObject **/
private $userFolder;
- /** @var IPreview|\PHPUnit_Framework_MockObject_MockObject * */
+ /** @var IPreview|\PHPUnit\Framework\MockObject\MockObject * */
private $previewManager;
- /** @var IAppManager|\PHPUnit_Framework_MockObject_MockObject * */
+ /** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject * */
private $appManager;
protected function setUp(): void {
->with('222')
->willReturn([$filesNode2]);
- /** @var \OCA\DAV\Connector\Sabre\Directory|\PHPUnit_Framework_MockObject_MockObject $reportTargetNode */
+ /** @var \OCA\DAV\Connector\Sabre\Directory|\PHPUnit\Framework\MockObject\MockObject $reportTargetNode */
$result = $this->plugin->findNodesByFileIds($reportTargetNode, ['111', '222']);
$this->assertCount(2, $result);
->with('222')
->willReturn([$filesNode2]);
- /** @var \OCA\DAV\Connector\Sabre\Directory|\PHPUnit_Framework_MockObject_MockObject $reportTargetNode */
+ /** @var \OCA\DAV\Connector\Sabre\Directory|\PHPUnit\Framework\MockObject\MockObject $reportTargetNode */
$result = $this->plugin->findNodesByFileIds($reportTargetNode, ['111', '222']);
$this->assertCount(2, $result);
$this->assertEquals(['222'], array_values($this->invokePrivate($this->plugin, 'processFilterRules', [$rules])));
}
-
+
public function testProcessFilterRulesInvisibleTagAsUser() {
$this->expectException(\OCP\SystemTag\TagNotFoundException::class);
class PrincipalTest extends TestCase {
- /** @var IUserManager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager | \PHPUnit\Framework\MockObject\MockObject */
private $userManager;
/** @var \OCA\DAV\Connector\Sabre\Principal */
private $connector;
- /** @var IGroupManager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IGroupManager | \PHPUnit\Framework\MockObject\MockObject */
private $groupManager;
- /** @var IManager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager | \PHPUnit\Framework\MockObject\MockObject */
private $shareManager;
- /** @var IUserSession | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession | \PHPUnit\Framework\MockObject\MockObject */
private $userSession;
- /** @var IAppManager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppManager | \PHPUnit\Framework\MockObject\MockObject */
private $appManager;
- /** @var ProxyMapper | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var ProxyMapper | \PHPUnit\Framework\MockObject\MockObject */
private $proxyMapper;
- /** @var IConfig | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject */
private $config;
protected function setUp(): void {
*/
class QuotaPluginTest extends TestCase {
- /** @var \Sabre\DAV\Server | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \Sabre\DAV\Server | \PHPUnit\Framework\MockObject\MockObject */
private $server;
- /** @var \OCA\DAV\Connector\Sabre\QuotaPlugin | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCA\DAV\Connector\Sabre\QuotaPlugin | \PHPUnit\Framework\MockObject\MockObject */
private $plugin;
private function init($quota, $checkedPath = '') {
class BirthdayCalendarControllerTest extends TestCase {
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var IDBConnection|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IDBConnection|\PHPUnit\Framework\MockObject\MockObject */
private $db;
- /** @var IJobList|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IJobList|\PHPUnit\Framework\MockObject\MockObject */
private $jobList;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
private $userManager;
- /** @var CalDavBackend|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var CalDavBackend|\PHPUnit\Framework\MockObject\MockObject */
private $caldav;
- /** @var BirthdayCalendarController|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var BirthdayCalendarController|\PHPUnit\Framework\MockObject\MockObject */
private $controller;
protected function setUp(): void {
class DirectControllerTest extends TestCase {
- /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */
private $rootFolder;
- /** @var DirectMapper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var DirectMapper|\PHPUnit\Framework\MockObject\MockObject */
private $directMapper;
- /** @var ISecureRandom|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISecureRandom|\PHPUnit\Framework\MockObject\MockObject */
private $random;
- /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
private $timeFactory;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
private $urlGenerator;
/** @var DirectController */
/** @var InvitationResponseController */
private $controller;
- /** @var IDBConnection|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IDBConnection|\PHPUnit\Framework\MockObject\MockObject */
private $dbConnection;
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
private $timeFactory;
- /** @var InvitationResponseServer|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var InvitationResponseServer|\PHPUnit\Framework\MockObject\MockObject */
private $responseServer;
protected function setUp(): void {
namespace OCA\DAV\Tests\unit\DAV;
use OCA\DAV\Files\BrowserErrorPagePlugin;
-use PHPUnit_Framework_MockObject_MockObject;
use Sabre\DAV\Exception\NotFound;
use Sabre\HTTP\Response;
* @param $exception
*/
public function test($expectedCode, $exception) {
- /** @var BrowserErrorPagePlugin | PHPUnit_Framework_MockObject_MockObject $plugin */
+ /** @var BrowserErrorPagePlugin | \PHPUnit\Framework\MockObject\MockObject $plugin */
$plugin = $this->getMockBuilder(BrowserErrorPagePlugin::class)->setMethods(['sendResponse', 'generateBody'])->getMock();
$plugin->expects($this->once())->method('generateBody')->willReturn(':boom:');
$plugin->expects($this->once())->method('sendResponse');
- /** @var \Sabre\DAV\Server | PHPUnit_Framework_MockObject_MockObject $server */
+ /** @var \Sabre\DAV\Server | \PHPUnit\Framework\MockObject\MockObject $server */
$server = $this->getMockBuilder('Sabre\DAV\Server')->disableOriginalConstructor()->getMock();
$server->expects($this->once())->method('on');
$httpResponse = $this->getMockBuilder(Response::class)->disableOriginalConstructor()->getMock();
*/
class CustomPropertiesBackendTest extends TestCase {
- /** @var Tree | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var Tree | \PHPUnit\Framework\MockObject\MockObject */
private $tree;
/** @var IDBConnection */
private $dbConnection;
- /** @var IUser | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUser | \PHPUnit\Framework\MockObject\MockObject */
private $user;
- /** @var CustomPropertiesBackend | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var CustomPropertiesBackend | \PHPUnit\Framework\MockObject\MockObject */
private $backend;
protected function setUp(): void {
class GroupPrincipalTest extends \Test\TestCase {
- /** @var IGroupManager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IGroupManager | \PHPUnit\Framework\MockObject\MockObject */
private $groupManager;
- /** @var IUserSession | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession | \PHPUnit\Framework\MockObject\MockObject */
private $userSession;
- /** @var IManager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager | \PHPUnit\Framework\MockObject\MockObject */
private $shareManager;
/** @var GroupPrincipalBackend */
$this->assertSame([], $response);
}
-
+
public function testSetGroupMembership() {
$this->expectException(\Sabre\DAV\Exception::class);
$this->expectExceptionMessage('Setting members of the group is not supported yet');
}
/**
- * @return Group|\PHPUnit_Framework_MockObject_MockObject
+ * @return Group|\PHPUnit\Framework\MockObject\MockObject
*/
private function mockGroup($gid) {
$fooGroup = $this->createMock(Group::class);
/** @var IL10N */
private $l10n;
- /** @var EventDispatcherInterface | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var EventDispatcherInterface | \PHPUnit\Framework\MockObject\MockObject */
private $eventDispatcher;
protected function setUp(): void {
->getMock();
$user->expects($this->once())->method('getUID')->willReturn('newUser');
- /** @var IUserManager | \PHPUnit_Framework_MockObject_MockObject $userManager */
+ /** @var IUserManager | \PHPUnit\Framework\MockObject\MockObject $userManager */
$userManager = $this->getMockBuilder(IUserManager::class)
->disableOriginalConstructor()
->getMock();
- /** @var SyncService | \PHPUnit_Framework_MockObject_MockObject $syncService */
+ /** @var SyncService | \PHPUnit\Framework\MockObject\MockObject $syncService */
$syncService = $this->getMockBuilder(SyncService::class)
->disableOriginalConstructor()
->getMock();
- /** @var CalDavBackend | \PHPUnit_Framework_MockObject_MockObject $cal */
+ /** @var CalDavBackend | \PHPUnit\Framework\MockObject\MockObject $cal */
$cal = $this->getMockBuilder(CalDavBackend::class)
->disableOriginalConstructor()
->getMock();
'principals/users/newUser',
'personal', ['{DAV:}displayname' => 'Personal']);
- /** @var CardDavBackend | \PHPUnit_Framework_MockObject_MockObject $card */
+ /** @var CardDavBackend | \PHPUnit\Framework\MockObject\MockObject $card */
$card = $this->getMockBuilder(CardDavBackend::class)
->disableOriginalConstructor()
->getMock();
->getMock();
$user->expects($this->once())->method('getUID')->willReturn('newUser');
- /** @var IUserManager | \PHPUnit_Framework_MockObject_MockObject $userManager */
+ /** @var IUserManager | \PHPUnit\Framework\MockObject\MockObject $userManager */
$userManager = $this->getMockBuilder(IUserManager::class)
->disableOriginalConstructor()
->getMock();
- /** @var SyncService | \PHPUnit_Framework_MockObject_MockObject $syncService */
+ /** @var SyncService | \PHPUnit\Framework\MockObject\MockObject $syncService */
$syncService = $this->getMockBuilder(SyncService::class)
->disableOriginalConstructor()
->getMock();
- /** @var CalDavBackend | \PHPUnit_Framework_MockObject_MockObject $cal */
+ /** @var CalDavBackend | \PHPUnit\Framework\MockObject\MockObject $cal */
$cal = $this->getMockBuilder(CalDavBackend::class)
->disableOriginalConstructor()
->getMock();
$cal->expects($this->once())->method('getCalendarsForUserCount')->willReturn(1);
$cal->expects($this->never())->method('createCalendar');
- /** @var CardDavBackend | \PHPUnit_Framework_MockObject_MockObject $card */
+ /** @var CardDavBackend | \PHPUnit\Framework\MockObject\MockObject $card */
$card = $this->getMockBuilder(CardDavBackend::class)
->disableOriginalConstructor()
->getMock();
->getMock();
$user->expects($this->once())->method('getUID')->willReturn('newUser');
- /** @var IUserManager | \PHPUnit_Framework_MockObject_MockObject $userManager */
+ /** @var IUserManager | \PHPUnit\Framework\MockObject\MockObject $userManager */
$userManager = $this->getMockBuilder(IUserManager::class)
->disableOriginalConstructor()
->getMock();
- /** @var SyncService | \PHPUnit_Framework_MockObject_MockObject $syncService */
+ /** @var SyncService | \PHPUnit\Framework\MockObject\MockObject $syncService */
$syncService = $this->getMockBuilder(SyncService::class)
->disableOriginalConstructor()
->getMock();
- /** @var CalDavBackend | \PHPUnit_Framework_MockObject_MockObject $cal */
+ /** @var CalDavBackend | \PHPUnit\Framework\MockObject\MockObject $cal */
$cal = $this->getMockBuilder(CalDavBackend::class)
->disableOriginalConstructor()
->getMock();
'principals/users/newUser',
'personal', ['{DAV:}displayname' => 'Personal']);
- /** @var CardDavBackend | \PHPUnit_Framework_MockObject_MockObject $card */
+ /** @var CardDavBackend | \PHPUnit\Framework\MockObject\MockObject $card */
$card = $this->getMockBuilder(CardDavBackend::class)
->disableOriginalConstructor()
->getMock();
->disableOriginalConstructor()
->getMock();
- /** @var IUserManager | \PHPUnit_Framework_MockObject_MockObject $userManager */
+ /** @var IUserManager | \PHPUnit\Framework\MockObject\MockObject $userManager */
$userManager = $this->getMockBuilder(IUserManager::class)
->disableOriginalConstructor()
->getMock();
$userManager->expects($this->once())->method('get')->willReturn($user);
- /** @var SyncService | \PHPUnit_Framework_MockObject_MockObject $syncService */
+ /** @var SyncService | \PHPUnit\Framework\MockObject\MockObject $syncService */
$syncService = $this->getMockBuilder(SyncService::class)
->disableOriginalConstructor()
->getMock();
$syncService->expects($this->once())
->method('deleteUser');
- /** @var CalDavBackend | \PHPUnit_Framework_MockObject_MockObject $cal */
+ /** @var CalDavBackend | \PHPUnit\Framework\MockObject\MockObject $cal */
$cal = $this->getMockBuilder(CalDavBackend::class)
->disableOriginalConstructor()
->getMock();
$cal->expects($this->once())->method('deleteCalendar');
$cal->expects($this->once())->method('deleteAllSharesByUser');
- /** @var CardDavBackend | \PHPUnit_Framework_MockObject_MockObject $card */
+ /** @var CardDavBackend | \PHPUnit\Framework\MockObject\MockObject $card */
$card = $this->getMockBuilder(CardDavBackend::class)
->disableOriginalConstructor()
->getMock();
private $plugin;
/** @var Server */
private $server;
- /** @var IShareable | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IShareable | \PHPUnit\Framework\MockObject\MockObject */
private $book;
protected function setUp(): void {
parent::setUp();
- /** @var Auth | \PHPUnit_Framework_MockObject_MockObject $authBackend */
+ /** @var Auth | \PHPUnit\Framework\MockObject\MockObject $authBackend */
$authBackend = $this->getMockBuilder(Auth::class)->disableOriginalConstructor()->getMock();
$authBackend->method('isDavAuthenticated')->willReturn(true);
/** @var Direct */
private $direct;
- /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */
private $rootFolder;
- /** @var Folder|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Folder|\PHPUnit\Framework\MockObject\MockObject */
private $userFolder;
- /** @var File|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var File|\PHPUnit\Framework\MockObject\MockObject */
private $file;
/** @var DirectFile */
class DirectHomeTest extends TestCase {
- /** @var DirectMapper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var DirectMapper|\PHPUnit\Framework\MockObject\MockObject */
private $directMapper;
- /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */
private $rootFolder;
- /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
private $timeFactory;
- /** @var Throttler|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Throttler|\PHPUnit\Framework\MockObject\MockObject */
private $throttler;
/** @var IRequest */
use Test\TestCase;
class FileSearchBackendTest extends TestCase {
- /** @var CachingTree|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var CachingTree|\PHPUnit\Framework\MockObject\MockObject */
private $tree;
/** @var IUser */
private $user;
- /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */
private $rootFolder;
- /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
private $shareManager;
- /** @var View|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var View|\PHPUnit\Framework\MockObject\MockObject */
private $view;
- /** @var Folder|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Folder|\PHPUnit\Framework\MockObject\MockObject */
private $searchFolder;
/** @var FileSearchBackend */
private $search;
- /** @var Directory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Directory|\PHPUnit\Framework\MockObject\MockObject */
private $davFolder;
protected function setUp(): void {
class FilesDropPluginTest extends TestCase {
- /** @var View|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var View|\PHPUnit\Framework\MockObject\MockObject */
private $view;
- /** @var Server|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Server|\PHPUnit\Framework\MockObject\MockObject */
private $server;
/** @var FilesDropPlugin */
private $plugin;
- /** @var RequestInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var RequestInterface|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var ResponseInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ResponseInterface|\PHPUnit\Framework\MockObject\MockObject */
private $response;
protected function setUp(): void {
*/
class CalDAVRemoveEmptyValueTest extends TestCase {
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
private $logger;
- /** @var CalDavBackend|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var CalDavBackend|\PHPUnit\Framework\MockObject\MockObject */
private $backend;
- /** @var IOutput|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IOutput|\PHPUnit\Framework\MockObject\MockObject */
private $output;
/** @var string */
DTSTAMP:20151214T091032Z
STATUS:CONFIRMED
SEQUENCE:0
-SUMMARY:Ein Geburtstag
+SUMMARY:Ein Geburtstag
DTSTART;VALUE=:20151223T173000Z
X-APPLE-TRAVEL-ADVISORY-BEHAVIOR:AUTOMATIC
CREATED;VALUE=:20151214T091032Z
DTSTAMP:20151214T091032Z
STATUS:CONFIRMED
SEQUENCE:0
-SUMMARY:Ein Geburtstag
+SUMMARY:Ein Geburtstag
DTSTART:20151223T173000Z
X-APPLE-TRAVEL-ADVISORY-BEHAVIOR:AUTOMATIC
CREATED:20151214T091032Z
}
public function testRunAllValid() {
- /** @var CalDAVRemoveEmptyValue|\PHPUnit_Framework_MockObject_MockObject $step */
+ /** @var CalDAVRemoveEmptyValue|\PHPUnit\Framework\MockObject\MockObject $step */
$step = $this->getMockBuilder(CalDAVRemoveEmptyValue::class)
->setConstructorArgs([
\OC::$server->getDatabaseConnection(),
}
public function testRunInvalid() {
- /** @var CalDAVRemoveEmptyValue|\PHPUnit_Framework_MockObject_MockObject $step */
+ /** @var CalDAVRemoveEmptyValue|\PHPUnit\Framework\MockObject\MockObject $step */
$step = $this->getMockBuilder(CalDAVRemoveEmptyValue::class)
->setConstructorArgs([
\OC::$server->getDatabaseConnection(),
}
public function testRunValid() {
- /** @var CalDAVRemoveEmptyValue|\PHPUnit_Framework_MockObject_MockObject $step */
+ /** @var CalDAVRemoveEmptyValue|\PHPUnit\Framework\MockObject\MockObject $step */
$step = $this->getMockBuilder(CalDAVRemoveEmptyValue::class)
->setConstructorArgs([
\OC::$server->getDatabaseConnection(),
}
public function testRunStillInvalid() {
- /** @var CalDAVRemoveEmptyValue|\PHPUnit_Framework_MockObject_MockObject $step */
+ /** @var CalDAVRemoveEmptyValue|\PHPUnit\Framework\MockObject\MockObject $step */
$step = $this->getMockBuilder(CalDAVRemoveEmptyValue::class)
->setConstructorArgs([
\OC::$server->getDatabaseConnection(),
class RefreshWebcalJobRegistrarTest extends TestCase {
- /** @var IDBConnection | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IDBConnection | \PHPUnit\Framework\MockObject\MockObject */
private $db;
- /** @var IJobList | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IJobList | \PHPUnit\Framework\MockObject\MockObject */
private $jobList;
/** @var RefreshWebcalJobRegistrar */
class RegenerateBirthdayCalendarsTest extends TestCase {
- /** @var IJobList | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IJobList | \PHPUnit\Framework\MockObject\MockObject */
private $jobList;
- /** @var IConfig | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject */
private $config;
/** @var RegenerateBirthdayCalendars */
class AppleProvisioningNodeTest extends TestCase {
- /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
private $timeFactory;
/** @var AppleProvisioningNode */
$this->assertEquals('apple-provisioning.mobileconfig', $this->node->getName());
}
-
+
public function testSetName() {
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
$this->expectExceptionMessage('Renaming apple-provisioning.mobileconfig is forbidden');
$this->assertEquals(null, $this->node->getLastModified());
}
-
+
public function testDelete() {
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
$this->expectExceptionMessage('apple-provisioning.mobileconfig may not be deleted');
], $this->node->getProperties([]));
}
-
+
public function testGetPropPatch() {
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
$this->expectExceptionMessage('apple-provisioning.mobileconfig\'s properties may not be altered.');
class AppleProvisioningPluginTest extends TestCase {
- /** @var \Sabre\DAV\Server|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \Sabre\DAV\Server|\PHPUnit\Framework\MockObject\MockObject */
protected $server;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
protected $userSession;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
protected $urlGenerator;
- /** @var ThemingDefaults|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ThemingDefaults|\PHPUnit\Framework\MockObject\MockObject */
protected $themingDefaults;
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
protected $request;
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
protected $l10n;
- /** @var \Sabre\HTTP\RequestInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \Sabre\HTTP\RequestInterface|\PHPUnit\Framework\MockObject\MockObject */
protected $sabreRequest;
- /** @var \Sabre\HTTP\ResponseInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \Sabre\HTTP\ResponseInterface|\PHPUnit\Framework\MockObject\MockObject */
protected $sabreResponse;
/** @var AppleProvisioningPlugin */
* @dataProvider providesUris
*/
public function test($uri, array $plugins) {
- /** @var IRequest | \PHPUnit_Framework_MockObject_MockObject $r */
+ /** @var IRequest | \PHPUnit\Framework\MockObject\MockObject $r */
$r = $this->createMock(IRequest::class);
$r->expects($this->any())->method('getRequestUri')->willReturn($uri);
$s = new Server($r, '/');
class CalDAVSettingsTest extends TestCase {
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
/** @var CalDAVSettings */
class SystemTagNodeTest extends \Test\TestCase {
/**
- * @var \OCP\SystemTag\ISystemTagManager|\PHPUnit_Framework_MockObject_MockObject
+ * @var \OCP\SystemTag\ISystemTagManager|\PHPUnit\Framework\MockObject\MockObject
*/
private $tagManager;
$this->assertEquals($tag, $node->getSystemTag());
}
-
+
public function testSetName() {
$this->expectException(\Sabre\DAV\Exception\MethodNotAllowed::class);
$this->assertInstanceOf($expectedException, $thrown);
}
-
+
public function testUpdateTagAlreadyExists() {
$this->expectException(\Sabre\DAV\Exception\Conflict::class);
$this->getTagNode(false, $tag)->update('Renamed', true, true);
}
-
+
public function testUpdateTagNotFound() {
$this->expectException(\Sabre\DAV\Exception\NotFound::class);
$this->getTagNode(false, $tag)->delete();
}
-
+
public function testDeleteTagNotFound() {
$this->expectException(\Sabre\DAV\Exception\NotFound::class);
/**
- * @var \Sabre\DAV\Server | \PHPUnit_Framework_MockObject_MockObject
+ * @var \Sabre\DAV\Server | \PHPUnit\Framework\MockObject\MockObject
*/
private $server;
/**
- * @var \Sabre\DAV\Tree | \PHPUnit_Framework_MockObject_MockObject
+ * @var \Sabre\DAV\Tree | \PHPUnit\Framework\MockObject\MockObject
*/
private $tree;
* @var ChunkingPlugin
*/
private $plugin;
- /** @var RequestInterface | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var RequestInterface | \PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var ResponseInterface | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var ResponseInterface | \PHPUnit\Framework\MockObject\MockObject */
private $response;
protected function setUp(): void {
/** @var EnableMasterKey */
protected $enableMasterKey;
- /** @var Util | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var Util | \PHPUnit\Framework\MockObject\MockObject */
protected $util;
- /** @var \OCP\IConfig | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IConfig | \PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var \Symfony\Component\Console\Helper\QuestionHelper | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \Symfony\Component\Console\Helper\QuestionHelper | \PHPUnit\Framework\MockObject\MockObject */
protected $questionHelper;
- /** @var \Symfony\Component\Console\Output\OutputInterface | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \Symfony\Component\Console\Output\OutputInterface | \PHPUnit\Framework\MockObject\MockObject */
protected $output;
- /** @var \Symfony\Component\Console\Input\InputInterface | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \Symfony\Component\Console\Input\InputInterface | \PHPUnit\Framework\MockObject\MockObject */
protected $input;
protected function setUp(): void {
class RecoveryControllerTest extends TestCase {
/** @var RecoveryController */
private $controller;
- /** @var \OCP\IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $requestMock;
- /** @var \OCP\IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $configMock;
- /** @var \OCP\IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l10nMock;
- /** @var \OCA\Encryption\Recovery|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCA\Encryption\Recovery|\PHPUnit\Framework\MockObject\MockObject */
private $recoveryMock;
public function adminRecoveryProvider() {
/** @var SettingsController */
private $controller;
- /** @var \OCP\IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $requestMock;
- /** @var \OCP\IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l10nMock;
- /** @var \OCP\IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IUserManager|\PHPUnit\Framework\MockObject\MockObject */
private $userManagerMock;
- /** @var \OCP\IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IUserSession|\PHPUnit\Framework\MockObject\MockObject */
private $userSessionMock;
- /** @var \OCA\Encryption\KeyManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCA\Encryption\KeyManager|\PHPUnit\Framework\MockObject\MockObject */
private $keyManagerMock;
- /** @var \OCA\Encryption\Crypto\Crypt|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCA\Encryption\Crypto\Crypt|\PHPUnit\Framework\MockObject\MockObject */
private $cryptMock;
- /** @var \OCA\Encryption\Session|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCA\Encryption\Session|\PHPUnit\Framework\MockObject\MockObject */
private $sessionMock;
/** @var MockObject|IUser */
private $user;
- /** @var \OCP\ISession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\ISession|\PHPUnit\Framework\MockObject\MockObject */
private $ocSessionMock;
- /** @var \OCA\Encryption\Util|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCA\Encryption\Util|\PHPUnit\Framework\MockObject\MockObject */
private $utilMock;
protected function setUp(): void {
class StatusControllerTest extends TestCase {
- /** @var \OCP\IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $requestMock;
- /** @var \OCP\IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l10nMock;
- /** @var \OCA\Encryption\Session | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCA\Encryption\Session | \PHPUnit\Framework\MockObject\MockObject */
protected $sessionMock;
- /** @var IManager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager | \PHPUnit\Framework\MockObject\MockObject */
protected $encryptionManagerMock;
/** @var StatusController */
class CryptTest extends TestCase {
- /** @var \OCP\ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\ILogger|\PHPUnit\Framework\MockObject\MockObject */
private $logger;
- /** @var \OCP\IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IUserSession|\PHPUnit\Framework\MockObject\MockObject */
private $userSession;
- /** @var \OCP\IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var \OCP\IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l;
/** @var Crypt */
* @dataProvider dataTestDecryptPrivateKey
*/
public function testDecryptPrivateKey($header, $privateKey, $expectedCipher, $isValidKey, $expected) {
- /** @var \OCA\Encryption\Crypto\Crypt | \PHPUnit_Framework_MockObject_MockObject $crypt */
+ /** @var \OCA\Encryption\Crypto\Crypt | \PHPUnit\Framework\MockObject\MockObject $crypt */
$crypt = $this->getMockBuilder(Crypt::class)
->setConstructorArgs(
[
/** @var DecryptAll */
protected $instance;
- /** @var Util | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var Util | \PHPUnit\Framework\MockObject\MockObject */
protected $util;
- /** @var KeyManager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var KeyManager | \PHPUnit\Framework\MockObject\MockObject */
protected $keyManager;
- /** @var Crypt | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var Crypt | \PHPUnit\Framework\MockObject\MockObject */
protected $crypt;
- /** @var Session | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var Session | \PHPUnit\Framework\MockObject\MockObject */
protected $session;
- /** @var QuestionHelper | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var QuestionHelper | \PHPUnit\Framework\MockObject\MockObject */
protected $questionHelper;
protected function setUp(): void {
class EncryptAllTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCA\Encryption\KeyManager */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OCA\Encryption\KeyManager */
protected $keyManager;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCA\Encryption\Util */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OCA\Encryption\Util */
protected $util;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\IUserManager */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\IUserManager */
protected $userManager;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCA\Encryption\Users\Setup */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OCA\Encryption\Users\Setup */
protected $setupUser;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OC\Files\View */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OC\Files\View */
protected $view;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\IConfig */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\IConfig */
protected $config;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\Mail\IMailer */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\Mail\IMailer */
protected $mailer;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\IL10N */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\IL10N */
protected $l;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \Symfony\Component\Console\Helper\QuestionHelper */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Helper\QuestionHelper */
protected $questionHelper;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \Symfony\Component\Console\Input\InputInterface */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Input\InputInterface */
protected $inputInterface;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \Symfony\Component\Console\Output\OutputInterface */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Output\OutputInterface */
protected $outputInterface;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\UserInterface */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\UserInterface */
protected $userInterface;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\Security\ISecureRandom */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\Security\ISecureRandom */
protected $secureRandom;
/** @var EncryptAll */
}
public function testEncryptAll() {
- /** @var EncryptAll | \PHPUnit_Framework_MockObject_MockObject $encryptAll */
+ /** @var EncryptAll | \PHPUnit\Framework\MockObject\MockObject $encryptAll */
$encryptAll = $this->getMockBuilder(EncryptAll::class)
->setConstructorArgs(
[
}
public function testEncryptAllWithMasterKey() {
- /** @var EncryptAll | \PHPUnit_Framework_MockObject_MockObject $encryptAll */
+ /** @var EncryptAll | \PHPUnit\Framework\MockObject\MockObject $encryptAll */
$encryptAll = $this->getMockBuilder(EncryptAll::class)
->setConstructorArgs(
[
}
public function testCreateKeyPairs() {
- /** @var EncryptAll | \PHPUnit_Framework_MockObject_MockObject $encryptAll */
+ /** @var EncryptAll | \PHPUnit\Framework\MockObject\MockObject $encryptAll */
$encryptAll = $this->getMockBuilder(EncryptAll::class)
->setConstructorArgs(
[
}
public function testEncryptAllUsersFiles() {
- /** @var EncryptAll | \PHPUnit_Framework_MockObject_MockObject $encryptAll */
+ /** @var EncryptAll | \PHPUnit\Framework\MockObject\MockObject $encryptAll */
$encryptAll = $this->getMockBuilder(EncryptAll::class)
->setConstructorArgs(
[
}
public function testEncryptUsersFiles() {
- /** @var EncryptAll | \PHPUnit_Framework_MockObject_MockObject $encryptAll */
+ /** @var EncryptAll | \PHPUnit\Framework\MockObject\MockObject $encryptAll */
$encryptAll = $this->getMockBuilder(EncryptAll::class)
->setConstructorArgs(
[
/** @var Encryption */
private $instance;
- /** @var \OCA\Encryption\KeyManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCA\Encryption\KeyManager|\PHPUnit\Framework\MockObject\MockObject */
private $keyManagerMock;
- /** @var \OCA\Encryption\Crypto\EncryptAll|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCA\Encryption\Crypto\EncryptAll|\PHPUnit\Framework\MockObject\MockObject */
private $encryptAllMock;
- /** @var \OCA\Encryption\Crypto\DecryptAll|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCA\Encryption\Crypto\DecryptAll|\PHPUnit\Framework\MockObject\MockObject */
private $decryptAllMock;
- /** @var \OCA\Encryption\Session|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCA\Encryption\Session|\PHPUnit\Framework\MockObject\MockObject */
private $sessionMock;
- /** @var \OCA\Encryption\Crypto\Crypt|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCA\Encryption\Crypto\Crypt|\PHPUnit\Framework\MockObject\MockObject */
private $cryptMock;
- /** @var \OCA\Encryption\Util|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCA\Encryption\Util|\PHPUnit\Framework\MockObject\MockObject */
private $utilMock;
- /** @var \OCP\ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\ILogger|\PHPUnit\Framework\MockObject\MockObject */
private $loggerMock;
- /** @var \OCP\IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l10nMock;
- /** @var \OCP\Files\Storage|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\Files\Storage|\PHPUnit\Framework\MockObject\MockObject */
private $storageMock;
protected function setUp(): void {
];
}
-
+
public function testDecrypt() {
$this->expectException(\OC\Encryption\Exceptions\DecryptionFailedException::class);
$this->expectExceptionMessage('Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you.');
*/
class UserHooksTest extends TestCase {
/**
- * @var \PHPUnit_Framework_MockObject_MockObject
+ * @var \PHPUnit\Framework\MockObject\MockObject
*/
private $utilMock;
/**
- * @var \PHPUnit_Framework_MockObject_MockObject
+ * @var \PHPUnit\Framework\MockObject\MockObject
*/
private $recoveryMock;
/**
- * @var \PHPUnit_Framework_MockObject_MockObject
+ * @var \PHPUnit\Framework\MockObject\MockObject
*/
private $sessionMock;
/**
- * @var \PHPUnit_Framework_MockObject_MockObject
+ * @var \PHPUnit\Framework\MockObject\MockObject
*/
private $keyManagerMock;
/**
- * @var \PHPUnit_Framework_MockObject_MockObject
+ * @var \PHPUnit\Framework\MockObject\MockObject
*/
private $userManagerMock;
/**
- * @var \PHPUnit_Framework_MockObject_MockObject
+ * @var \PHPUnit\Framework\MockObject\MockObject
*/
private $userSetupMock;
/**
- * @var \PHPUnit_Framework_MockObject_MockObject
+ * @var \PHPUnit\Framework\MockObject\MockObject
*/
private $userSessionMock;
/**
*/
private $user;
/**
- * @var \PHPUnit_Framework_MockObject_MockObject
+ * @var \PHPUnit\Framework\MockObject\MockObject
*/
private $cryptMock;
/**
- * @var \PHPUnit_Framework_MockObject_MockObject
+ * @var \PHPUnit\Framework\MockObject\MockObject
*/
private $loggerMock;
/**
*/
public function testPreSetPassphrase($canChange) {
- /** @var UserHooks | \PHPUnit_Framework_MockObject_MockObject $instance */
+ /** @var UserHooks | \PHPUnit\Framework\MockObject\MockObject $instance */
$instance = $this->getMockBuilder(UserHooks::class)
->setConstructorArgs(
[
/** @var string */
private $systemKeyId;
- /** @var \OCP\Encryption\Keys\IStorage|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\Encryption\Keys\IStorage|\PHPUnit\Framework\MockObject\MockObject */
private $keyStorageMock;
- /** @var \OCA\Encryption\Crypto\Crypt|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCA\Encryption\Crypto\Crypt|\PHPUnit\Framework\MockObject\MockObject */
private $cryptMock;
- /** @var \OCP\IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IUserSession|\PHPUnit\Framework\MockObject\MockObject */
private $userMock;
- /** @var \OCA\Encryption\Session|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCA\Encryption\Session|\PHPUnit\Framework\MockObject\MockObject */
private $sessionMock;
- /** @var \OCP\ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\ILogger|\PHPUnit\Framework\MockObject\MockObject */
private $logMock;
- /** @var \OCA\Encryption\Util|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCA\Encryption\Util|\PHPUnit\Framework\MockObject\MockObject */
private $utilMock;
- /** @var \OCP\IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $configMock;
protected function setUp(): void {
];
}
-
+
public function testUserHasKeysMissingPrivateKey() {
$this->expectException(\OCA\Encryption\Exceptions\PrivateKeyMissingException::class);
$this->instance->userHasKeys($this->userId);
}
-
+
public function testUserHasKeysMissingPublicKey() {
$this->expectException(\OCA\Encryption\Exceptions\PublicKeyMissingException::class);
*/
public function testInit($useMasterKey) {
- /** @var \OCA\Encryption\KeyManager|\PHPUnit_Framework_MockObject_MockObject $instance */
+ /** @var \OCA\Encryption\KeyManager|\PHPUnit\Framework\MockObject\MockObject $instance */
$instance = $this->getMockBuilder(KeyManager::class)
->setConstructorArgs(
[
);
}
-
+
public function testGetMasterKeyPasswordException() {
$this->expectException(\Exception::class);
*/
public function testValidateMasterKey($masterKey) {
- /** @var \OCA\Encryption\KeyManager | \PHPUnit_Framework_MockObject_MockObject $instance */
+ /** @var \OCA\Encryption\KeyManager | \PHPUnit\Framework\MockObject\MockObject $instance */
$instance = $this->getMockBuilder(KeyManager::class)
->setConstructorArgs(
[
class RecoveryTest extends TestCase {
private static $tempStorage = [];
/**
- * @var \OCP\Encryption\IFile|\PHPUnit_Framework_MockObject_MockObject
+ * @var \OCP\Encryption\IFile|\PHPUnit\Framework\MockObject\MockObject
*/
private $fileMock;
/**
- * @var \OC\Files\View|\PHPUnit_Framework_MockObject_MockObject
+ * @var \OC\Files\View|\PHPUnit\Framework\MockObject\MockObject
*/
private $viewMock;
/**
- * @var \OCP\IUserSession|\PHPUnit_Framework_MockObject_MockObject
+ * @var \OCP\IUserSession|\PHPUnit\Framework\MockObject\MockObject
*/
private $userSessionMock;
/**
*/
private $user;
/**
- * @var \OCA\Encryption\KeyManager|\PHPUnit_Framework_MockObject_MockObject
+ * @var \OCA\Encryption\KeyManager|\PHPUnit\Framework\MockObject\MockObject
*/
private $keyManagerMock;
/**
- * @var \OCP\IConfig|\PHPUnit_Framework_MockObject_MockObject
+ * @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject
*/
private $configMock;
/**
- * @var \OCA\Encryption\Crypto\Crypt|\PHPUnit_Framework_MockObject_MockObject
+ * @var \OCA\Encryption\Crypto\Crypt|\PHPUnit\Framework\MockObject\MockObject
*/
private $cryptMock;
/**
* @var Session
*/
private $instance;
- /** @var \OCP\ISession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\ISession|\PHPUnit\Framework\MockObject\MockObject */
private $sessionMock;
-
+
public function testThatGetPrivateKeyThrowsExceptionWhenNotSet() {
$this->expectException(\OCA\Encryption\Exceptions\PrivateKeyMissingException::class);
$this->expectExceptionMessage('Private Key missing for user: please try to log-out and log-in again');
$this->instance->getDecryptAllKey();
}
-
+
public function testSetAndGetStatusWillSetAndReturn() {
// Check if get status will return 0 if it has not been set before
$this->assertEquals(0, $this->instance->getStatus());
* @param bool $expected
*/
public function testIsReady($status, $expected) {
- /** @var Session | \PHPUnit_Framework_MockObject_MockObject $instance */
+ /** @var Session | \PHPUnit\Framework\MockObject\MockObject $instance */
$instance = $this->getMockBuilder(Session::class)
->setConstructorArgs([$this->sessionMock])
->setMethods(['getStatus'])->getMock();
return null;
}
-
+
public function testClearWillRemoveValues() {
$this->instance->setPrivateKey('privateKey');
$this->instance->setStatus('initStatus');
$this->assertEmpty(self::$tempStorage);
}
-
+
protected function setUp(): void {
parent::setUp();
$this->sessionMock = $this->createMock(ISession::class);
class SetupTest extends TestCase {
/**
- * @var \OCA\Encryption\KeyManager|\PHPUnit_Framework_MockObject_MockObject
+ * @var \OCA\Encryption\KeyManager|\PHPUnit\Framework\MockObject\MockObject
*/
private $keyManagerMock;
/**
- * @var \OCA\Encryption\Crypto\Crypt|\PHPUnit_Framework_MockObject_MockObject
+ * @var \OCA\Encryption\Crypto\Crypt|\PHPUnit\Framework\MockObject\MockObject
*/
private $cryptMock;
/**
class UtilTest extends TestCase {
private static $tempStorage = [];
- /** @var \OCP\IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $configMock;
- /** @var \OC\Files\View|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC\Files\View|\PHPUnit\Framework\MockObject\MockObject */
private $filesMock;
- /** @var \OCP\IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IUserManager|\PHPUnit\Framework\MockObject\MockObject */
private $userManagerMock;
- /** @var \OCP\Files\Mount\IMountPoint|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\Files\Mount\IMountPoint|\PHPUnit\Framework\MockObject\MockObject */
private $mountMock;
/** @var Util */
/** @var AddressHandler */
private $addressHandler;
- /** @var IURLGenerator | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator | \PHPUnit\Framework\MockObject\MockObject */
private $urlGenerator;
- /** @var IL10N | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N | \PHPUnit\Framework\MockObject\MockObject */
private $il10n;
/** @var CloudIdManager */
/** @var MountPublicLinkController */
private $controller;
- /** @var \OCP\IRequest | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IRequest | \PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var FederatedShareProvider | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var FederatedShareProvider | \PHPUnit\Framework\MockObject\MockObject */
private $federatedShareProvider;
- /** @var IManager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager | \PHPUnit\Framework\MockObject\MockObject */
private $shareManager;
- /** @var AddressHandler | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var AddressHandler | \PHPUnit\Framework\MockObject\MockObject */
private $addressHandler;
- /** @var IRootFolder | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRootFolder | \PHPUnit\Framework\MockObject\MockObject */
private $rootFolder;
- /** @var IUserManager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager | \PHPUnit\Framework\MockObject\MockObject */
private $userManager;
- /** @var ISession | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISession | \PHPUnit\Framework\MockObject\MockObject */
private $session;
- /** @var IL10N | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N | \PHPUnit\Framework\MockObject\MockObject */
private $l10n;
- /** @var IUserSession | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession | \PHPUnit\Framework\MockObject\MockObject */
private $userSession;
- /** @var IClientService | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IClientService | \PHPUnit\Framework\MockObject\MockObject */
private $clientService;
/** @var IShare */
/** @var RequestHandlerController */
private $requestHandler;
- /** @var \OCA\FederatedFileSharing\FederatedShareProvider|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCA\FederatedFileSharing\FederatedShareProvider|\PHPUnit\Framework\MockObject\MockObject */
private $federatedShareProvider;
- /** @var \OCA\FederatedFileSharing\Notifications|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCA\FederatedFileSharing\Notifications|\PHPUnit\Framework\MockObject\MockObject */
private $notifications;
- /** @var \OCA\FederatedFileSharing\AddressHandler|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCA\FederatedFileSharing\AddressHandler|\PHPUnit\Framework\MockObject\MockObject */
private $addressHandler;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
private $userManager;
- /** @var IShare|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IShare|\PHPUnit\Framework\MockObject\MockObject */
private $share;
- /** @var ICloudIdManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICloudIdManager|\PHPUnit\Framework\MockObject\MockObject */
private $cloudIdManager;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
private $logger;
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var IDBConnection|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IDBConnection|\PHPUnit\Framework\MockObject\MockObject */
private $connection;
- /** @var Share\IManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Share\IManager|\PHPUnit\Framework\MockObject\MockObject */
private $shareManager;
- /** @var ICloudFederationFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICloudFederationFactory|\PHPUnit\Framework\MockObject\MockObject */
private $cloudFederationFactory;
- /** @var ICloudFederationProviderManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICloudFederationProviderManager|\PHPUnit\Framework\MockObject\MockObject */
private $cloudFederationProviderManager;
- /** @var ICloudFederationProvider|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICloudFederationProvider|\PHPUnit\Framework\MockObject\MockObject */
private $cloudFederationProvider;
- /** @var ICloudFederationShare|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICloudFederationShare|\PHPUnit\Framework\MockObject\MockObject */
private $cloudFederationShare;
protected function setUp(): void {
'file'
)->willReturn($this->cloudFederationShare);
- /** @var ICloudFederationProvider|\PHPUnit_Framework_MockObject_MockObject $provider */
+ /** @var ICloudFederationProvider|\PHPUnit\Framework\MockObject\MockObject $provider */
$this->cloudFederationProviderManager->expects($this->once())
->method('getCloudFederationProvider')
->with('file')
/** @var IDBConnection */
protected $connection;
- /** @var AddressHandler | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var AddressHandler | \PHPUnit\Framework\MockObject\MockObject */
protected $addressHandler;
- /** @var Notifications | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var Notifications | \PHPUnit\Framework\MockObject\MockObject */
protected $notifications;
- /** @var TokenHandler|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var TokenHandler|\PHPUnit\Framework\MockObject\MockObject */
protected $tokenHandler;
/** @var IL10N */
protected $l;
/** @var ILogger */
protected $logger;
- /** @var IRootFolder | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRootFolder | \PHPUnit\Framework\MockObject\MockObject */
protected $rootFolder;
- /** @var IConfig | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var IUserManager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager | \PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
- /** @var \OCP\GlobalScale\IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\GlobalScale\IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $gsConfig;
/** @var IManager */
/** @var ICloudIdManager */
private $cloudIdManager;
- /** @var \PHPUnit_Framework_MockObject_MockObject|ICloudFederationProviderManager */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|ICloudFederationProviderManager */
private $cloudFederationProviderManager;
protected function setUp(): void {
class NotificationsTest extends \Test\TestCase {
- /** @var AddressHandler | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var AddressHandler | \PHPUnit\Framework\MockObject\MockObject */
private $addressHandler;
- /** @var IClientService | \PHPUnit_Framework_MockObject_MockObject*/
+ /** @var IClientService | \PHPUnit\Framework\MockObject\MockObject*/
private $httpClientService;
- /** @var IDiscoveryService | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IDiscoveryService | \PHPUnit\Framework\MockObject\MockObject */
private $discoveryService;
- /** @var IJobList | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IJobList | \PHPUnit\Framework\MockObject\MockObject */
private $jobList;
- /** @var ICloudFederationProviderManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICloudFederationProviderManager|\PHPUnit\Framework\MockObject\MockObject */
private $cloudFederationProviderManager;
- /** @var ICloudFederationFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICloudFederationFactory|\PHPUnit\Framework\MockObject\MockObject */
private $cloudFederationFactory;
- /** @var IEventDispatcher|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IEventDispatcher|\PHPUnit\Framework\MockObject\MockObject */
private $eventDispatcher;
protected function setUp(): void {
* get instance of Notifications class
*
* @param array $mockedMethods methods which should be mocked
- * @return Notifications | \PHPUnit_Framework_MockObject_MockObject
+ * @return Notifications | \PHPUnit\Framework\MockObject\MockObject
*/
private function getInstance(array $mockedMethods = []) {
if (empty($mockedMethods)) {
private $admin;
/** @var \OCA\FederatedFileSharing\FederatedShareProvider */
private $federatedShareProvider;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $gsConfig;
protected function setUp(): void {
/** @var TokenHandler */
private $tokenHandler;
- /** @var ISecureRandom | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISecureRandom | \PHPUnit\Framework\MockObject\MockObject */
private $secureRandom;
/** @var int */
*/
class GetSharedSecretTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject|IClient */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IClient */
private $httpClient;
- /** @var \PHPUnit_Framework_MockObject_MockObject|IClientService */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IClientService */
private $httpClientService;
- /** @var \PHPUnit_Framework_MockObject_MockObject|IJobList */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IJobList */
private $jobList;
- /** @var \PHPUnit_Framework_MockObject_MockObject|IURLGenerator */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IURLGenerator */
private $urlGenerator;
- /** @var \PHPUnit_Framework_MockObject_MockObject|TrustedServers */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|TrustedServers */
private $trustedServers;
- /** @var \PHPUnit_Framework_MockObject_MockObject|ILogger */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|ILogger */
private $logger;
- /** @var \PHPUnit_Framework_MockObject_MockObject|IResponse */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IResponse */
private $response;
- /** @var \PHPUnit_Framework_MockObject_MockObject|IDiscoveryService */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IDiscoveryService */
private $discoverService;
- /** @var \PHPUnit_Framework_MockObject_MockObject|ITimeFactory */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|ITimeFactory */
private $timeFactory;
/** @var GetSharedSecret */
* @param bool $retainBackgroundJob
*/
public function testExecute($isTrustedServer, $retainBackgroundJob) {
- /** @var GetSharedSecret |\PHPUnit_Framework_MockObject_MockObject $getSharedSecret */
+ /** @var GetSharedSecret |\PHPUnit\Framework\MockObject\MockObject $getSharedSecret */
$getSharedSecret = $this->getMockBuilder('OCA\Federation\BackgroundJob\GetSharedSecret')
->setConstructorArgs(
[
class RequestSharedSecretTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject|IClientService */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IClientService */
private $httpClientService;
- /** @var \PHPUnit_Framework_MockObject_MockObject|IClient */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IClient */
private $httpClient;
- /** @var \PHPUnit_Framework_MockObject_MockObject|IJobList */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IJobList */
private $jobList;
- /** @var \PHPUnit_Framework_MockObject_MockObject|IURLGenerator */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IURLGenerator */
private $urlGenerator;
- /** @var \PHPUnit_Framework_MockObject_MockObject|TrustedServers */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|TrustedServers */
private $trustedServers;
- /** @var \PHPUnit_Framework_MockObject_MockObject|IResponse */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IResponse */
private $response;
- /** @var \PHPUnit_Framework_MockObject_MockObject|IDiscoveryService */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IDiscoveryService */
private $discoveryService;
- /** @var \PHPUnit_Framework_MockObject_MockObject|ILogger */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|ILogger */
private $logger;
- /** @var \PHPUnit_Framework_MockObject_MockObject|ITimeFactory */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|ITimeFactory */
private $timeFactory;
/** @var RequestSharedSecret */
* @param bool $retainBackgroundJob
*/
public function testExecute($isTrustedServer, $retainBackgroundJob) {
- /** @var RequestSharedSecret |\PHPUnit_Framework_MockObject_MockObject $requestSharedSecret */
+ /** @var RequestSharedSecret |\PHPUnit\Framework\MockObject\MockObject $requestSharedSecret */
$requestSharedSecret = $this->getMockBuilder('OCA\Federation\BackgroundJob\RequestSharedSecret')
->setConstructorArgs(
[
class OCSAuthAPIControllerTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject|IRequest */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IRequest */
private $request;
- /** @var \PHPUnit_Framework_MockObject_MockObject|ISecureRandom */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|ISecureRandom */
private $secureRandom;
- /** @var \PHPUnit_Framework_MockObject_MockObject|JobList */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|JobList */
private $jobList;
- /** @var \PHPUnit_Framework_MockObject_MockObject|TrustedServers */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|TrustedServers */
private $trustedServers;
- /** @var \PHPUnit_Framework_MockObject_MockObject|DbHandler */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|DbHandler */
private $dbHandler;
- /** @var \PHPUnit_Framework_MockObject_MockObject|ILogger */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|ILogger */
private $logger;
- /** @var \PHPUnit_Framework_MockObject_MockObject|ITimeFactory */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|ITimeFactory */
private $timeFactory;
$url = 'url';
$token = 'token';
- /** @var OCSAuthAPIController | \PHPUnit_Framework_MockObject_MockObject $ocsAuthApi */
+ /** @var OCSAuthAPIController | \PHPUnit\Framework\MockObject\MockObject $ocsAuthApi */
$ocsAuthApi = $this->getMockBuilder('OCA\Federation\Controller\OCSAuthAPIController')
->setConstructorArgs(
[
/** @var SettingsController */
private $controller;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\IRequest */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\IRequest */
private $request;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\IL10N */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\IL10N */
private $l10n;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCA\Federation\TrustedServers */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OCA\Federation\TrustedServers */
private $trustedServers;
protected function setUp(): void {
* @param string $password
*/
public function testFedAuth($expected, $user, $password) {
- /** @var DbHandler | \PHPUnit_Framework_MockObject_MockObject $db */
+ /** @var DbHandler | \PHPUnit\Framework\MockObject\MockObject $db */
$db = $this->getMockBuilder('OCA\Federation\DbHandler')->disableOriginalConstructor()->getMock();
$db->method('auth')->willReturn(true);
$auth = new FedAuth($db);
/** @var DbHandler */
private $dbHandler;
- /** @var IL10N | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N | \PHPUnit\Framework\MockObject\MockObject */
private $il10n;
/** @var IDBConnection */
class HooksTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject | TrustedServers */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | TrustedServers */
private $trustedServers;
/** @var Hooks */
class AddServerMiddlewareTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject | ILogger */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | ILogger */
private $logger;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\IL10N */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\IL10N */
private $l10n;
/** @var AddServerMiddleware */
private $middleware;
- /** @var \PHPUnit_Framework_MockObject_MockObject | SettingsController */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | SettingsController */
private $controller;
protected function setUp(): void {
/** @var array */
private $callBacks = [];
- /** @var \PHPUnit_Framework_MockObject_MockObject | DiscoveryService */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | DiscoveryService */
private $discoveryService;
protected function setUp(): void {
}
public function testSync() {
- /** @var DbHandler | \PHPUnit_Framework_MockObject_MockObject $dbHandler */
+ /** @var DbHandler | \PHPUnit\Framework\MockObject\MockObject $dbHandler */
$dbHandler = $this->getMockBuilder('OCA\Federation\DbHandler')->
disableOriginalConstructor()->
getMock();
}
public function testException() {
- /** @var DbHandler | \PHPUnit_Framework_MockObject_MockObject $dbHandler */
+ /** @var DbHandler | \PHPUnit\Framework\MockObject\MockObject $dbHandler */
$dbHandler = $this->getMockBuilder('OCA\Federation\DbHandler')->
disableOriginalConstructor()->
getMock();
class TrustedServersTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject | TrustedServers */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | TrustedServers */
private $trustedServers;
- /** @var \PHPUnit_Framework_MockObject_MockObject | DbHandler */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | DbHandler */
private $dbHandler;
- /** @var \PHPUnit_Framework_MockObject_MockObject | IClientService */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | IClientService */
private $httpClientService;
- /** @var \PHPUnit_Framework_MockObject_MockObject | IClient */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | IClient */
private $httpClient;
- /** @var \PHPUnit_Framework_MockObject_MockObject | IResponse */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | IResponse */
private $response;
- /** @var \PHPUnit_Framework_MockObject_MockObject | ILogger */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | ILogger */
private $logger;
- /** @var \PHPUnit_Framework_MockObject_MockObject | IJobList */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | IJobList */
private $jobList;
- /** @var \PHPUnit_Framework_MockObject_MockObject | ISecureRandom */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | ISecureRandom */
private $secureRandom;
- /** @var \PHPUnit_Framework_MockObject_MockObject | IConfig */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | IConfig */
private $config;
- /** @var \PHPUnit_Framework_MockObject_MockObject | EventDispatcherInterface */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | EventDispatcherInterface */
private $dispatcher;
- /** @var \PHPUnit_Framework_MockObject_MockObject|ITimeFactory */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|ITimeFactory */
private $timeFactory;
protected function setUp(): void {
* @param bool $success
*/
public function testAddServer($success) {
- /** @var \PHPUnit_Framework_MockObject_MockObject|TrustedServers $trustedServers */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|TrustedServers $trustedServers */
$trustedServers = $this->getMockBuilder('OCA\Federation\TrustedServers')
->setConstructorArgs(
[
public function testIsOwnCloudServer($statusCode, $isValidOwnCloudVersion, $expected) {
$server = 'server1';
- /** @var \PHPUnit_Framework_MockObject_MockObject | TrustedServers $trustedServers */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | TrustedServers $trustedServers */
$trustedServers = $this->getMockBuilder('OCA\Federation\TrustedServers')
->setConstructorArgs(
[
private $request;
/** @var TagService */
private $tagService;
- /** @var IPreview|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IPreview|\PHPUnit\Framework\MockObject\MockObject */
private $preview;
/** @var ApiController */
private $apiController;
private $shareManager;
/** @var \OCP\IConfig */
private $config;
- /** @var Folder|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Folder|\PHPUnit\Framework\MockObject\MockObject */
private $userFolder;
protected function setUp(): void {
* @package OCA\Files\Tests\Controller
*/
class ViewControllerTest extends TestCase {
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
private $urlGenerator;
/** @var IL10N */
private $l10n;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
/** @var EventDispatcherInterface */
private $eventDispatcher;
- /** @var ViewController|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ViewController|\PHPUnit\Framework\MockObject\MockObject */
private $viewController;
/** @var IUser */
private $user;
/** @var IUserSession */
private $userSession;
- /** @var IAppManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */
private $appManager;
- /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */
private $rootFolder;
- /** @var Helper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Helper|\PHPUnit\Framework\MockObject\MockObject */
private $activityHelper;
protected function setUp(): void {
*/
private $user;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
private $userSession;
- /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
private $activityManager;
/**
*/
private $root;
- /** @var EventDispatcherInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject */
private $dispatcher;
/**
- * @var \OCA\Files\Service\TagService|\PHPUnit_Framework_MockObject_MockObject
+ * @var \OCA\Files\Service\TagService|\PHPUnit\Framework\MockObject\MockObject
*/
private $tagService;
/**
* @param array $methods
- * @return TagService|\PHPUnit_Framework_MockObject_MockObject
+ * @return TagService|\PHPUnit\Framework\MockObject\MockObject
*/
protected function getTagService(array $methods = []) {
return $this->getMockBuilder(TagService::class)
class GlobalAuthTest extends TestCase {
/**
- * @var \OCP\IL10N|\PHPUnit_Framework_MockObject_MockObject
+ * @var \OCP\IL10N|\PHPUnit\Framework\MockObject\MockObject
*/
private $l10n;
/**
- * @var \OCP\Security\ICredentialsManager|\PHPUnit_Framework_MockObject_MockObject
+ * @var \OCP\Security\ICredentialsManager|\PHPUnit\Framework\MockObject\MockObject
*/
private $credentialsManager;
}
private function getStorageConfig($type, $config = []) {
- /** @var \OCA\Files_External\Lib\StorageConfig|\PHPUnit_Framework_MockObject_MockObject $storageConfig */
+ /** @var \OCA\Files_External\Lib\StorageConfig|\PHPUnit\Framework\MockObject\MockObject $storageConfig */
$storageConfig = $this->createMock(StorageConfig::class);
$storageConfig->expects($this->any())
->method('getType')
], $storage->getBackendOptions());
}
-
+
public function testNoCredentialsPersonal() {
$this->expectException(\OCA\Files_External\Lib\InsufficientDataForMeaningfulAnswerException::class);
class ApplicableTest extends CommandTest {
private function getInstance($storageService) {
- /** @var \OCP\IUserManager|\PHPUnit_Framework_MockObject_MockObject $userManager */
+ /** @var \OCP\IUserManager|\PHPUnit\Framework\MockObject\MockObject $userManager */
$userManager = $this->createMock(IUserManager::class);
- /** @var \OCP\IGroupManager|\PHPUnit_Framework_MockObject_MockObject $groupManager */
+ /** @var \OCP\IGroupManager|\PHPUnit\Framework\MockObject\MockObject $groupManager */
$groupManager = $this->createMock(IGroupManager::class);
$userManager->expects($this->any())
abstract class CommandTest extends TestCase {
/**
* @param StorageConfig[] $mounts
- * @return \OCA\Files_External\Service\GlobalStoragesService|\PHPUnit_Framework_MockObject_MockObject
+ * @return \OCA\Files_External\Service\GlobalStoragesService|\PHPUnit\Framework\MockObject\MockObject
*/
protected function getGlobalStorageService(array $mounts = []) {
$mock = $this->getMockBuilder('OCA\Files_External\Service\GlobalStoragesService')
}
/**
- * @param \PHPUnit_Framework_MockObject_MockObject $mock
+ * @param \PHPUnit\Framework\MockObject\MockObject $mock
* @param StorageConfig[] $mounts
*/
- protected function bindMounts(\PHPUnit_Framework_MockObject_MockObject $mock, array $mounts) {
+ protected function bindMounts(\PHPUnit\Framework\MockObject\MockObject $mock, array $mounts) {
$mock->expects($this->any())
->method('getStorage')
->willReturnCallback(function ($id) use ($mounts) {
use OCP\IUserManager;
use OCP\IUserSession;
use OCP\Security\ICrypto;
-use PHPUnit_Framework_MockObject_MockObject;
use Symfony\Component\Console\Output\BufferedOutput;
class ListCommandTest extends CommandTest {
/**
- * @return ListCommand|PHPUnit_Framework_MockObject_MockObject
+ * @return ListCommand|\PHPUnit\Framework\MockObject\MockObject
*/
private function getInstance() {
- /** @var GlobalStoragesService|PHPUnit_Framework_MockObject_MockObject $globalService */
+ /** @var GlobalStoragesService|\PHPUnit\Framework\MockObject\MockObject $globalService */
$globalService = $this->createMock(GlobalStoragesService::class);
- /** @var UserStoragesService|PHPUnit_Framework_MockObject_MockObject $userService */
+ /** @var UserStoragesService|\PHPUnit\Framework\MockObject\MockObject $userService */
$userService = $this->createMock(UserStoragesService::class);
- /** @var IUserManager|PHPUnit_Framework_MockObject_MockObject $userManager */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject $userManager */
$userManager = $this->createMock(IUserManager::class);
- /** @var IUserSession|PHPUnit_Framework_MockObject_MockObject $userSession */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject $userSession */
$userSession = $this->createMock(IUserSession::class);
return new ListCommand($globalService, $userService, $userSession, $userManager);
use OCP\Share\IManager;
class UserPlaceholderHandlerTest extends \Test\TestCase {
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject */
protected $user;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
protected $session;
- /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
private $shareManager;
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
private $userManager;
/** @var UserPlaceholderHandler */
class BackendServiceTest extends \Test\TestCase {
- /** @var \OCP\IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
protected function setUp(): void {
/**
* @param string $class
*
- * @return \OCA\Files_External\Lib\Backend\Backend|\PHPUnit_Framework_MockObject_MockObject
+ * @return \OCA\Files_External\Lib\Backend\Backend|\PHPUnit\Framework\MockObject\MockObject
*/
protected function getBackendMock($class) {
$backend = $this->getMockBuilder(Backend::class)
/**
* @param string $class
*
- * @return \OCA\Files_External\Lib\Auth\AuthMechanism|\PHPUnit_Framework_MockObject_MockObject
+ * @return \OCA\Files_External\Lib\Auth\AuthMechanism|\PHPUnit\Framework\MockObject\MockObject
*/
protected function getAuthMechanismMock($class) {
$backend = $this->getMockBuilder(AuthMechanism::class)
$backend = $this->getBackendMock('\Foo\Bar');
- /** @var \OCA\Files_External\Lib\Backend\Backend|\PHPUnit_Framework_MockObject_MockObject $backendAlias */
+ /** @var \OCA\Files_External\Lib\Backend\Backend|\PHPUnit\Framework\MockObject\MockObject $backendAlias */
$backendAlias = $this->getMockBuilder(Backend::class)
->disableOriginalConstructor()
->getMock();
$backend1 = $this->getBackendMock('\Foo\Bar');
$backend2 = $this->getBackendMock('\Bar\Foo');
- /** @var IBackendProvider|\PHPUnit_Framework_MockObject_MockObject $providerMock */
+ /** @var IBackendProvider|\PHPUnit\Framework\MockObject\MockObject $providerMock */
$providerMock = $this->createMock(IBackendProvider::class);
$providerMock->expects($this->once())
->method('getBackends')
$backend1 = $this->getAuthMechanismMock('\Foo\Bar');
$backend2 = $this->getAuthMechanismMock('\Bar\Foo');
- /** @var IAuthMechanismProvider|\PHPUnit_Framework_MockObject_MockObject $providerMock */
+ /** @var IAuthMechanismProvider|\PHPUnit\Framework\MockObject\MockObject $providerMock */
$providerMock = $this->createMock(IAuthMechanismProvider::class);
$providerMock->expects($this->once())
->method('getAuthMechanisms')
$backend2 = $this->getBackendMock('\Dead\Beef');
- /** @var IBackendProvider|\PHPUnit_Framework_MockObject_MockObject $provider1Mock */
+ /** @var IBackendProvider|\PHPUnit\Framework\MockObject\MockObject $provider1Mock */
$provider1Mock = $this->createMock(IBackendProvider::class);
$provider1Mock->expects($this->once())
->method('getBackends')
->willReturn([$backend1a, $backend1b]);
$service->registerBackendProvider($provider1Mock);
- /** @var IBackendProvider|\PHPUnit_Framework_MockObject_MockObject $provider2Mock */
+ /** @var IBackendProvider|\PHPUnit\Framework\MockObject\MockObject $provider2Mock */
$provider2Mock = $this->createMock(IBackendProvider::class);
$provider2Mock->expects($this->once())
->method('getBackends')
protected static $hookCalls;
/**
- * @var \PHPUnit_Framework_MockObject_MockObject|\OCP\Files\Config\IUserMountCache
+ * @var \PHPUnit\Framework\MockObject\MockObject|\OCP\Files\Config\IUserMountCache
*/
protected $mountCache;
class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest {
use UserTrait;
- /** @var \OCP\IGroupManager|\PHPUnit_Framework_MockObject_MockObject groupManager */
+ /** @var \OCP\IGroupManager|\PHPUnit\Framework\MockObject\MockObject groupManager */
protected $groupManager;
/**
$this->globalStoragesService = $this->service;
$this->user = new \OC\User\User(self::USER_ID, null, \OC::$server->getEventDispatcher());
- /** @var \OCP\IUserSession|\PHPUnit_Framework_MockObject_MockObject $userSession */
+ /** @var \OCP\IUserSession|\PHPUnit\Framework\MockObject\MockObject $userSession */
$userSession = $this->createMock(IUserSession::class);
$userSession
->expects($this->any())
$this->createUser($this->userId, $this->userId);
$this->user = \OC::$server->getUserManager()->get($this->userId);
- /** @var \OCP\IUserSession|\PHPUnit_Framework_MockObject_MockObject $userSession */
+ /** @var \OCP\IUserSession|\PHPUnit\Framework\MockObject\MockObject $userSession */
$userSession = $this->createMock(IUserSession::class);
$userSession
->expects($this->any())
class AdminTest extends TestCase {
/** @var Admin */
private $admin;
- /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
private $encryptionManager;
- /** @var GlobalStoragesService|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var GlobalStoragesService|\PHPUnit\Framework\MockObject\MockObject */
private $globalStoragesService;
- /** @var BackendService|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var BackendService|\PHPUnit\Framework\MockObject\MockObject */
private $backendService;
- /** @var GlobalAuth|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var GlobalAuth|\PHPUnit\Framework\MockObject\MockObject */
private $globalAuth;
protected function setUp(): void {
use Test\TestCase;
class ShareRecipientSorterTest extends TestCase {
- /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
protected $shareManager;
- /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */
protected $rootFolder;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
protected $userSession;
/** @var ShareRecipientSorter */
protected $sorter;
public function testSort($data) {
$node = $this->createMock(Node::class);
- /** @var Folder|\PHPUnit_Framework_MockObject_MockObject $folder */
+ /** @var Folder|\PHPUnit\Framework\MockObject\MockObject $folder */
$folder = $this->createMock(Folder::class);
$this->rootFolder->expects($this->any())
->method('getUserFolder')
}
public function testSortNoNodes() {
- /** @var Folder|\PHPUnit_Framework_MockObject_MockObject $folder */
+ /** @var Folder|\PHPUnit\Framework\MockObject\MockObject $folder */
$folder = $this->createMock(Folder::class);
$this->rootFolder->expects($this->any())
->method('getUserFolder')
class PublicPreviewControllerTest extends TestCase {
- /** @var IPreview|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IPreview|\PHPUnit\Framework\MockObject\MockObject */
private $previewManager;
- /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
private $shareManager;
/** @var ITimeFactory|MockObject */
private $timeFactory;
/** @var string */
private $appName = 'files_sharing';
- /** @var \OC\Share20\Manager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC\Share20\Manager|\PHPUnit\Framework\MockObject\MockObject */
private $shareManager;
- /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */
private $groupManager;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
private $userManager;
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */
private $rootFolder;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
private $urlGenerator;
- /** @var string|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var string|\PHPUnit\Framework\MockObject\MockObject */
private $currentUser;
/** @var ShareAPIController */
private $ocs;
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var IAppManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */
private $appManager;
- /** @var IServerContainer|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IServerContainer|\PHPUnit\Framework\MockObject\MockObject */
private $serverContainer;
protected function setUp(): void {
}
/**
- * @return ShareAPIController|\PHPUnit_Framework_MockObject_MockObject
+ * @return ShareAPIController|\PHPUnit\Framework\MockObject\MockObject
*/
private function mockFormatShare() {
return $this->getMockBuilder(ShareAPIController::class)
* @dataProvider dataGetShare
*/
public function testGetShare(\OCP\Share\IShare $share, array $result) {
- /** @var ShareAPIController|\PHPUnit_Framework_MockObject_MockObject $ocs */
+ /** @var ShareAPIController|\PHPUnit\Framework\MockObject\MockObject $ocs */
$ocs = $this->getMockBuilder(ShareAPIController::class)
->setConstructorArgs([
$this->appName,
$share = $this->newShare();
$this->shareManager->method('newShare')->willReturn($share);
- /** @var ShareAPIController|\PHPUnit_Framework_MockObject_MockObject $ocs */
+ /** @var ShareAPIController|\PHPUnit\Framework\MockObject\MockObject $ocs */
$ocs = $this->getMockBuilder(ShareAPIController::class)
->setConstructorArgs([
$this->appName,
$share = \OC::$server->getShareManager()->newShare();
$this->shareManager->method('newShare')->willReturn($share);
- /** @var ShareAPIController|\PHPUnit_Framework_MockObject_MockObject $ocs */
+ /** @var ShareAPIController|\PHPUnit\Framework\MockObject\MockObject $ocs */
$ocs = $this->getMockBuilder(ShareAPIController::class)
->setConstructorArgs([
$this->appName,
/** @var ShareInfoController */
private $controller;
- /** @var ShareManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ShareManager|\PHPUnit\Framework\MockObject\MockObject */
private $shareManager;
/** @var string */
protected $uid;
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
protected $request;
- /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
protected $shareManager;
- /** @var ISearch|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISearch|\PHPUnit\Framework\MockObject\MockObject */
protected $collaboratorSearch;
protected function setUp(): void {
$this->request = $this->createMock(IRequest::class);
$this->shareManager = $this->createMock(IManager::class);
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject $configMock */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject $configMock */
$configMock = $this->createMock(IConfig::class);
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject $urlGeneratorMock */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject $urlGeneratorMock */
$urlGeneratorMock = $this->createMock(IURLGenerator::class);
$this->collaboratorSearch = $this->createMock(ISearch::class);
$perPage = isset($getData['perPage']) ? $getData['perPage'] : 200;
$shareType = isset($getData['shareType']) ? $getData['shareType'] : null;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject $config */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject $config */
$config = $this->createMock(IConfig::class);
$config->expects($this->exactly(1))
->method('getAppValue')
/** @var string */
$uid = 'test123';
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject $request */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject $request */
$request = $this->createMock(IRequest::class);
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject $urlGenerator */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject $urlGenerator */
$urlGenerator = $this->createMock(IURLGenerator::class);
- /** @var \PHPUnit_Framework_MockObject_MockObject|\OCA\Files_Sharing\Controller\ShareesAPIController $sharees */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|\OCA\Files_Sharing\Controller\ShareesAPIController $sharees */
$sharees = $this->getMockBuilder('\OCA\Files_Sharing\Controller\ShareesAPIController')
->setConstructorArgs([
$uid,
$page = isset($getData['page']) ? $getData['page'] : 1;
$perPage = isset($getData['perPage']) ? $getData['perPage'] : 200;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject $config */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject $config */
$config = $this->createMock(IConfig::class);
$config->expects($this->never())
->method('getAppValue');
/** @var string */
$uid = 'test123';
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject $request */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject $request */
$request = $this->createMock(IRequest::class);
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject $urlGenerator */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject $urlGenerator */
$urlGenerator = $this->createMock(IURLGenerator::class);
- /** @var \PHPUnit_Framework_MockObject_MockObject|\OCA\Files_Sharing\Controller\ShareesAPIController $sharees */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|\OCA\Files_Sharing\Controller\ShareesAPIController $sharees */
$sharees = $this->getMockBuilder('\OCA\Files_Sharing\Controller\ShareesAPIController')
->setConstructorArgs([
$uid,
class ManagerTest extends TestCase {
use UserTrait;
- /** @var Manager|\PHPUnit_Framework_MockObject_MockObject **/
+ /** @var Manager|\PHPUnit\Framework\MockObject\MockObject **/
private $manager;
/** @var \OC\Files\Mount\Manager */
private $mountManager;
- /** @var IClientService|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IClientService|\PHPUnit\Framework\MockObject\MockObject */
private $clientService;
- /** @var ICloudFederationProviderManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICloudFederationProviderManager|\PHPUnit\Framework\MockObject\MockObject */
private $cloudFederationProviderManager;
- /** @var ICloudFederationFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICloudFederationFactory|\PHPUnit\Framework\MockObject\MockObject */
private $cloudFederationFactory;
- /** @var \PHPUnit_Framework_MockObject_MockObject|IGroupManager */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IGroupManager */
private $groupManager;
- /** @var \PHPUnit_Framework_MockObject_MockObject|IUserManager */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IUserManager */
private $userManager;
private $uid;
class ScannerTest extends TestCase {
/** @var \OCA\Files_Sharing\External\Scanner */
protected $scanner;
- /** @var \OCA\Files_Sharing\External\Storage|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCA\Files_Sharing\External\Storage|\PHPUnit\Framework\MockObject\MockObject */
protected $storage;
- /** @var \OC\Files\Cache\Cache|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC\Files\Cache\Cache|\PHPUnit\Framework\MockObject\MockObject */
protected $cache;
protected function setUp(): void {
*/
class OCSShareAPIMiddlewareTest extends \Test\TestCase {
- /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
private $shareManager;
/** @var IL10N */
private $l;
class ShareInfoMiddlewareTest extends TestCase {
- /** @var ShareManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ShareManager|\PHPUnit\Framework\MockObject\MockObject */
private $shareManager;
/** @var ShareInfoMiddleware */
*/
class SharingCheckMiddlewareTest extends \Test\TestCase {
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var IAppManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */
private $appManager;
/** @var SharingCheckMiddleware */
private $sharingCheckMiddleware;
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject */
private $controllerMock;
- /** @var IControllerMethodReflector|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IControllerMethodReflector|\PHPUnit\Framework\MockObject\MockObject */
private $reflector;
- /** @var IManager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager | \PHPUnit\Framework\MockObject\MockObject */
private $shareManager;
- /** @var IRequest | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest | \PHPUnit\Framework\MockObject\MockObject */
private $request;
protected function setUp(): void {
$this->sharingCheckMiddleware->beforeController($controller, 'myMethod');
}
-
+
public function testBeforeControllerWithSharingDisabled() {
$this->expectException(\OCP\Files\NotFoundException::class);
$this->expectExceptionMessage('Sharing is disabled.');
$this->sharingCheckMiddleware->beforeController($this->controllerMock, 'myMethod');
}
-
+
public function testAfterExceptionWithRegularException() {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('My Exception message');
/** @var \OCP\IDBConnection */
private $connection;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
/** @var SetPasswordColumn */
/** @var MountProvider */
private $provider;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject */
private $user;
- /** @var IStorageFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IStorageFactory|\PHPUnit\Framework\MockObject\MockObject */
private $loader;
- /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
private $shareManager;
- /** @var ILogger | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger | \PHPUnit\Framework\MockObject\MockObject */
private $logger;
protected function setUp(): void {
/** @var CleanUp */
protected $cleanup;
- /** @var \PHPUnit_Framework_MockObject_MockObject | Manager */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | Manager */
protected $userManager;
- /** @var \PHPUnit_Framework_MockObject_MockObject | IRootFolder */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | IRootFolder */
protected $rootFolder;
/** @var \OC\DB\Connection */
use Test\TestCase;
class PreviewControllerTest extends TestCase {
- /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */
private $rootFolder;
/** @var string */
private $userId;
- /** @var IMimeTypeDetector|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IMimeTypeDetector|\PHPUnit\Framework\MockObject\MockObject */
private $mimeTypeDetector;
- /** @var IPreview|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IPreview|\PHPUnit\Framework\MockObject\MockObject */
private $previewManager;
- /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
private $time;
/** @var PreviewController */
private $controller;
- /** @var ITrashManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITrashManager|\PHPUnit\Framework\MockObject\MockObject */
private $trashManager;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
private $userSession;
protected function setUp(): void {
*/
public function testSingleStorageDeleteFileFail() {
/**
- * @var \OC\Files\Storage\Temporary | \PHPUnit_Framework_MockObject_MockObject $storage
+ * @var \OC\Files\Storage\Temporary | \PHPUnit\Framework\MockObject\MockObject $storage
*/
$storage = $this->getMockBuilder('\OC\Files\Storage\Temporary')
->setConstructorArgs([[]])
*/
public function testSingleStorageDeleteFolderFail() {
/**
- * @var \OC\Files\Storage\Temporary | \PHPUnit_Framework_MockObject_MockObject $storage
+ * @var \OC\Files\Storage\Temporary | \PHPUnit\Framework\MockObject\MockObject $storage
*/
$storage = $this->getMockBuilder('\OC\Files\Storage\Temporary')
->setConstructorArgs([[]])
/** @var CleanUp */
protected $cleanup;
- /** @var \PHPUnit_Framework_MockObject_MockObject | Manager */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | Manager */
protected $userManager;
- /** @var \PHPUnit_Framework_MockObject_MockObject | IRootFolder */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | IRootFolder */
protected $rootFolder;
protected function setUp(): void {
class PreviewControllerTest extends TestCase {
- /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */
private $rootFolder;
/** @var string */
private $userId;
- /** @var IMimeTypeDetector|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IMimeTypeDetector|\PHPUnit\Framework\MockObject\MockObject */
private $mimeTypeDetector;
- /** @var IPreview|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IPreview|\PHPUnit\Framework\MockObject\MockObject */
private $previewManager;
- /** @var PreviewController|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var PreviewController|\PHPUnit\Framework\MockObject\MockObject */
private $controller;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
private $userSession;
- /** @var IVersionManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IVersionManager|\PHPUnit\Framework\MockObject\MockObject */
private $versionManager;
protected function setUp(): void {
* @group DB
*/
class LoginRedirectorControllerTest extends TestCase {
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
private $urlGenerator;
- /** @var ClientMapper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ClientMapper|\PHPUnit\Framework\MockObject\MockObject */
private $clientMapper;
- /** @var ISession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISession|\PHPUnit\Framework\MockObject\MockObject */
private $session;
/** @var LoginRedirectorController */
private $loginRedirectorController;
use Test\TestCase;
class OauthApiControllerTest extends TestCase {
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var ICrypto|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICrypto|\PHPUnit\Framework\MockObject\MockObject */
private $crypto;
- /** @var AccessTokenMapper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var AccessTokenMapper|\PHPUnit\Framework\MockObject\MockObject */
private $accessTokenMapper;
- /** @var ClientMapper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ClientMapper|\PHPUnit\Framework\MockObject\MockObject */
private $clientMapper;
- /** @var TokenProvider|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var TokenProvider|\PHPUnit\Framework\MockObject\MockObject */
private $tokenProvider;
- /** @var ISecureRandom|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISecureRandom|\PHPUnit\Framework\MockObject\MockObject */
private $secureRandom;
- /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
private $time;
- /** @var Throttler|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Throttler|\PHPUnit\Framework\MockObject\MockObject */
private $throttler;
/** @var OauthApiController */
private $oauthApiController;
use Test\TestCase;
class SettingsControllerTest extends TestCase {
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var ClientMapper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ClientMapper|\PHPUnit\Framework\MockObject\MockObject */
private $clientMapper;
- /** @var ISecureRandom|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISecureRandom|\PHPUnit\Framework\MockObject\MockObject */
private $secureRandom;
- /** @var AccessTokenMapper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var AccessTokenMapper|\PHPUnit\Framework\MockObject\MockObject */
private $accessTokenMapper;
- /** @var DefaultTokenMapper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var DefaultTokenMapper|\PHPUnit\Framework\MockObject\MockObject */
private $defaultTokenMapper;
/** @var SettingsController */
private $settingsController;
*/
class AppConfigControllerTest extends TestCase {
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var IAppConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppConfig|\PHPUnit\Framework\MockObject\MockObject */
private $appConfig;
protected function setUp(): void {
/**
* @param string[] $methods
- * @return AppConfigController|\PHPUnit_Framework_MockObject_MockObject
+ * @return AppConfigController|\PHPUnit\Framework\MockObject\MockObject
*/
protected function getInstance(array $methods = []) {
$request = $this->createMock(IRequest::class);
class GroupsControllerTest extends \Test\TestCase {
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
protected $request;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var Manager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Manager|\PHPUnit\Framework\MockObject\MockObject */
protected $groupManager;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
protected $userSession;
- /** @var AccountManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var AccountManager|\PHPUnit\Framework\MockObject\MockObject */
protected $accountManager;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
protected $logger;
- /** @var SubAdmin|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var SubAdmin|\PHPUnit\Framework\MockObject\MockObject */
protected $subAdminManager;
- /** @var GroupsController|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var GroupsController|\PHPUnit\Framework\MockObject\MockObject */
protected $api;
/**
* @param string $gid
- * @return \OCP\IGroup|\PHPUnit_Framework_MockObject_MockObject
+ * @return \OCP\IGroup|\PHPUnit\Framework\MockObject\MockObject
*/
private function createGroup($gid) {
$group = $this->getMockBuilder('\OCP\IGroup')->disableOriginalConstructor()->getMock();
/**
* @param string $uid
- * @return \OCP\IUser|\PHPUnit_Framework_MockObject_MockObject
+ * @return \OCP\IUser|\PHPUnit\Framework\MockObject\MockObject
*/
private function createUser($uid) {
$user = $this->getMockBuilder(IUser::class)->disableOriginalConstructor()->getMock();
->method('getUserGroups')
->willReturn([$group]);
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
$this->subAdminManager->expects($this->any())
->method('isSubAdminOfGroup')
->willReturn(false);
->method('getUserGroups')
->willReturn([$group]);
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
$this->subAdminManager->expects($this->any())
->method('isSubAdminOfGroup')
->willReturn(false);
use OCP\Security\ISecureRandom;
use OCP\UserInterface;
use PHPUnit\Framework\MockObject\MockObject;
-use PHPUnit_Framework_MockObject_MockObject;
use Test\TestCase;
class UsersControllerTest extends TestCase {
- /** @var IUserManager|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|MockObject */
protected $userManager;
- /** @var IConfig|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|MockObject */
protected $config;
- /** @var IAppManager|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppManager|MockObject */
protected $appManager;
- /** @var Manager|PHPUnit_Framework_MockObject_MockObject */
+ /** @var Manager|MockObject */
protected $groupManager;
- /** @var IUserSession|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|MockObject */
protected $userSession;
- /** @var ILogger|PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|MockObject */
protected $logger;
- /** @var UsersController|PHPUnit_Framework_MockObject_MockObject */
+ /** @var UsersController|MockObject */
protected $api;
- /** @var AccountManager|PHPUnit_Framework_MockObject_MockObject */
+ /** @var AccountManager|MockObject */
protected $accountManager;
- /** @var IRequest|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|MockObject */
protected $request;
- /** @var IFactory|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IFactory|MockObject */
private $l10nFactory;
- /** @var NewUserMailHelper|PHPUnit_Framework_MockObject_MockObject */
+ /** @var NewUserMailHelper|MockObject */
private $newUserMailHelper;
- /** @var FederatedShareProviderFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var FederatedShareProviderFactory|MockObject */
private $federatedShareProviderFactory;
- /** @var ISecureRandom|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISecureRandom|MockObject */
private $secureRandom;
/** @var RemoteWipe|MockObject */
private $remoteWipe;
$this->userSession->expects($this->once())->method('getUser')
->willReturn($user);
- /** @var UsersController | PHPUnit_Framework_MockObject_MockObject $api */
+ /** @var UsersController | MockObject $api */
$api = $this->getMockBuilder('OCA\Provisioning_API\Controller\UsersController')
->setConstructorArgs([
'provisioning_api',
public function testGetUser() {
- /** @var UsersController | PHPUnit_Framework_MockObject_MockObject $api */
+ /** @var UsersController | MockObject $api */
$api = $this->getMockBuilder('OCA\Provisioning_API\Controller\UsersController')
->setConstructorArgs([
'provisioning_api',
class ProvisioningApiMiddlewareTest extends TestCase {
- /** @var IControllerMethodReflector|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IControllerMethodReflector|\PHPUnit\Framework\MockObject\MockObject */
private $reflector;
protected function setUp(): void {
* @package Tests\Settings\Controller
*/
class CheckSetupControllerTest extends TestCase {
- /** @var CheckSetupController | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var CheckSetupController | \PHPUnit\Framework\MockObject\MockObject */
private $checkSetupController;
- /** @var IRequest | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest | \PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var IConfig | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var IClientService | \PHPUnit_Framework_MockObject_MockObject*/
+ /** @var IClientService | \PHPUnit\Framework\MockObject\MockObject*/
private $clientService;
- /** @var IURLGenerator | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator | \PHPUnit\Framework\MockObject\MockObject */
private $urlGenerator;
- /** @var IL10N | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N | \PHPUnit\Framework\MockObject\MockObject */
private $l10n;
/** @var ILogger */
private $logger;
- /** @var Checker|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Checker|\PHPUnit\Framework\MockObject\MockObject */
private $checker;
- /** @var EventDispatcherInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject */
private $dispatcher;
- /** @var Connection|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Connection|\PHPUnit\Framework\MockObject\MockObject */
private $db;
- /** @var ILockingProvider|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILockingProvider|\PHPUnit\Framework\MockObject\MockObject */
private $lockingProvider;
- /** @var IDateTimeFormatter|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IDateTimeFormatter|\PHPUnit\Framework\MockObject\MockObject */
private $dateTimeFormatter;
/** @var MemoryInfo|MockObject */
private $memoryInfo;
- /** @var SecureRandom|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var SecureRandom|\PHPUnit\Framework\MockObject\MockObject */
private $secureRandom;
/**
*/
class MailSettingsControllerTest extends \Test\TestCase {
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
private $userSession;
- /** @var IMailer|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IMailer|\PHPUnit\Framework\MockObject\MockObject */
private $mailer;
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l;
/** @var MailSettingsController */
$this->config = $this->createMock(IConfig::class);
$this->userSession = $this->createMock(IUserSession::class);
$this->mailer = $this->createMock(IMailer::class);
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject $request */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject $request */
$request = $this->createMock(IRequest::class);
$this->mailController = new MailSettingsController(
'settings',
*/
class UsersControllerTest extends \Test\TestCase {
- /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */
private $groupManager;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
private $userManager;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
private $userSession;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
private $logger;
- /** @var IMailer|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IMailer|\PHPUnit\Framework\MockObject\MockObject */
private $mailer;
- /** @var IFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IFactory|\PHPUnit\Framework\MockObject\MockObject */
private $l10nFactory;
- /** @var IAppManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */
private $appManager;
- /** @var IAvatarManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAvatarManager|\PHPUnit\Framework\MockObject\MockObject */
private $avatarManager;
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l;
- /** @var AccountManager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var AccountManager | \PHPUnit\Framework\MockObject\MockObject */
private $accountManager;
- /** @var ISecureRandom | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISecureRandom | \PHPUnit\Framework\MockObject\MockObject */
private $secureRandom;
- /** @var \OCA\Settings\Mailer\NewUserMailHelper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCA\Settings\Mailer\NewUserMailHelper|\PHPUnit\Framework\MockObject\MockObject */
private $newUserMailHelper;
- /** @var IJobList | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IJobList | \PHPUnit\Framework\MockObject\MockObject */
private $jobList;
- /** @var \OC\Security\IdentityProof\Manager |\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC\Security\IdentityProof\Manager |\PHPUnit\Framework\MockObject\MockObject */
private $securityManager;
- /** @var IManager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager | \PHPUnit\Framework\MockObject\MockObject */
private $encryptionManager;
- /** @var IEncryptionModule | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IEncryptionModule | \PHPUnit\Framework\MockObject\MockObject */
private $encryptionModule;
protected function setUp(): void {
/**
* @param bool $isAdmin
- * @return UsersController | \PHPUnit_Framework_MockObject_MockObject
+ * @return UsersController | \PHPUnit\Framework\MockObject\MockObject
*/
protected function getController($isAdmin = false, $mockedMethods = []) {
if (empty($mockedMethods)) {
use Test\TestCase;
class NewUserMailHelperTest extends TestCase {
- /** @var Defaults|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Defaults|\PHPUnit\Framework\MockObject\MockObject */
private $defaults;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
private $urlGenerator;
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l10n;
- /** @var IMailer|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IMailer|\PHPUnit\Framework\MockObject\MockObject */
private $mailer;
- /** @var ISecureRandom|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISecureRandom|\PHPUnit\Framework\MockObject\MockObject */
private $secureRandom;
- /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
private $timeFactory;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var ICrypto|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICrypto|\PHPUnit\Framework\MockObject\MockObject */
private $crypto;
/** @var \OCA\Settings\Mailer\NewUserMailHelper */
private $newUserMailHelper;
->expects($this->once())
->method('getTime')
->willReturn('12345');
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$user
->expects($this->any())
->with('/')
->willReturn('https://example.com/');
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$user
->expects($this->any())
->with('/')
->willReturn('https://example.com/');
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$user
->expects($this->any())
}
public function testSendMail() {
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$user
->expects($this->at(0))
->expects($this->at(1))
->method('getDisplayName')
->willReturn('John Doe');
- /** @var IEMailTemplate|\PHPUnit_Framework_MockObject_MockObject $emailTemplate */
+ /** @var IEMailTemplate|\PHPUnit\Framework\MockObject\MockObject $emailTemplate */
$emailTemplate = $this->createMock(IEMailTemplate::class);
$message = $this->createMock(Message::class);
$message
private $admin;
/** @var IConfig */
private $config;
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l10n;
- /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
private $shareManager;
protected function setUp(): void {
use OCP\Security\ISecureRandom;
use OCP\Share\IManager;
use OCP\Share\IShare;
-use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;
/**
/** @var IManager */
private $shareManager;
- /** @var IL10N | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N | \PHPUnit\Framework\MockObject\MockObject */
private $l;
- /** @var ILogger | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger | \PHPUnit\Framework\MockObject\MockObject */
private $logger;
- /** @var IRootFolder | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRootFolder | \PHPUnit\Framework\MockObject\MockObject */
private $rootFolder;
- /** @var IUserManager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager | \PHPUnit\Framework\MockObject\MockObject */
private $userManager;
- /** @var ISecureRandom | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISecureRandom | \PHPUnit\Framework\MockObject\MockObject */
private $secureRandom;
- /** @var IMailer | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IMailer | \PHPUnit\Framework\MockObject\MockObject */
private $mailer;
- /** @var IURLGenerator | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator | \PHPUnit\Framework\MockObject\MockObject */
private $urlGenerator;
- /** @var IShare | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IShare | \PHPUnit\Framework\MockObject\MockObject */
private $share;
- /** @var \OCP\Activity\IManager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\Activity\IManager | \PHPUnit\Framework\MockObject\MockObject */
private $activityManager;
- /** @var SettingsManager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var SettingsManager | \PHPUnit\Framework\MockObject\MockObject */
private $settingsManager;
- /** @var Defaults|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Defaults|\PHPUnit\Framework\MockObject\MockObject */
private $defaults;
- /** @var IHasher | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IHasher | \PHPUnit\Framework\MockObject\MockObject */
private $hasher;
/** @var IEventDispatcher */
* get instance of Mocked ShareByMailProvider
*
* @param array $mockedMethods internal methods which should be mocked
- * @return \PHPUnit_Framework_MockObject_MockObject | ShareByMailProvider
+ * @return \PHPUnit\Framework\MockObject\MockObject | ShareByMailProvider
*/
private function getInstance(array $mockedMethods = []) {
$instance = $this->getMockBuilder('OCA\ShareByMail\ShareByMailProvider')
use Test\TestCase;
class SettingTest extends TestCase {
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l;
/** @var Setting */
private $setting;
public function testCanChangeStream() {
$this->assertSame(true, $this->setting->canChangeStream());
}
-
+
public function testIsDefaultEnabledStream() {
$this->assertSame(true, $this->setting->isDefaultEnabledStream());
}
-
+
public function testCanChangeMail() {
$this->assertSame(true, $this->setting->canChangeMail());
}
-
+
public function testIsDefaultEnabledMail() {
$this->assertSame(false, $this->setting->isDefaultEnabledMail());
}
* @package OCA\Theming\Tests
*/
class CapabilitiesTest extends TestCase {
- /** @var ThemingDefaults|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ThemingDefaults|\PHPUnit\Framework\MockObject\MockObject */
protected $theming;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
protected $url;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var Util|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Util|\PHPUnit\Framework\MockObject\MockObject */
protected $util;
/** @var Capabilities */
use Test\TestCase;
class IconControllerTest extends TestCase {
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var ThemingDefaults|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ThemingDefaults|\PHPUnit\Framework\MockObject\MockObject */
private $themingDefaults;
/** @var \OCP\AppFramework\Utility\ITimeFactory */
private $timeFactory;
- /** @var IconController|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IconController|\PHPUnit\Framework\MockObject\MockObject */
private $iconController;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var IconBuilder|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IconBuilder|\PHPUnit\Framework\MockObject\MockObject */
private $iconBuilder;
- /** @var FileAccessHelper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var FileAccessHelper|\PHPUnit\Framework\MockObject\MockObject */
private $fileAccessHelper;
/** @var ImageManager */
private $imageManager;
use Test\TestCase;
class ThemingControllerTest extends TestCase {
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var ThemingDefaults|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ThemingDefaults|\PHPUnit\Framework\MockObject\MockObject */
private $themingDefaults;
/** @var \OCP\AppFramework\Utility\ITimeFactory */
private $timeFactory;
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l10n;
/** @var ThemingController */
private $themingController;
/** @var ITempManager */
private $tempManager;
- /** @var IAppManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */
private $appManager;
- /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */
private $appData;
- /** @var ImageManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ImageManager|\PHPUnit\Framework\MockObject\MockObject */
private $imageManager;
/** @var SCSSCacher */
private $scssCacher;
class ImageManagerTest extends TestCase {
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */
protected $appData;
/** @var ImageManager */
protected $imageManager;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
private $urlGenerator;
- /** @var ICacheFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICacheFactory|\PHPUnit\Framework\MockObject\MockObject */
private $cacheFactory;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
private $logger;
protected function setUp(): void {
}
public function mockGetImage($key, $file) {
- /** @var \PHPUnit_Framework_MockObject_MockObject $folder */
+ /** @var \PHPUnit\Framework\MockObject\MockObject $folder */
$folder = $this->createMock(ISimpleFolder::class);
if ($file === null) {
$folder->expects($this->once())
$this->assertEquals($file, $this->imageManager->getImage('logo', false));
}
-
+
public function testGetImageUnset() {
$this->expectException(\OCP\Files\NotFoundException::class);
$this->assertEquals($expected, $this->imageManager->getCachedImage('filename'));
}
-
+
public function testGetCachedImageNotFound() {
$this->expectException(\OCP\Files\NotFoundException::class);
use Test\TestCase;
class SectionTest extends TestCase {
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
private $url;
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l;
/** @var Section */
private $section;
use Test\TestCase;
class ThemingDefaultsTest extends TestCase {
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l10n;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
private $urlGenerator;
- /** @var \OC_Defaults|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC_Defaults|\PHPUnit\Framework\MockObject\MockObject */
private $defaults;
- /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */
private $appData;
- /** @var ICacheFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICacheFactory|\PHPUnit\Framework\MockObject\MockObject */
private $cacheFactory;
/** @var ThemingDefaults */
private $template;
- /** @var Util|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Util|\PHPUnit\Framework\MockObject\MockObject */
private $util;
- /** @var ICache|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICache|\PHPUnit\Framework\MockObject\MockObject */
private $cache;
- /** @var IAppManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */
private $appManager;
- /** @var ImageManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ImageManager|\PHPUnit\Framework\MockObject\MockObject */
private $imageManager;
- /** @var INavigationManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var INavigationManager|\PHPUnit\Framework\MockObject\MockObject */
private $navigationManager;
protected function setUp(): void {
/** @var string */
private $testUID = 'test123456789';
- /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
private $notificationManager;
protected function setUp(): void {
use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\L10N\IFactory;
-use PHPUnit_Framework_MockObject_MockObject;
use Test\TestCase;
class ProviderTest extends TestCase {
- /** @var IFactory|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IFactory|\PHPUnit\Framework\MockObject\MockObject */
private $l10n;
- /** @var IURLGenerator|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
private $urlGenerator;
- /** @var IManager|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
private $activityManager;
/** @var Provider */
class SettingsControllerTest extends TestCase {
- /** @var IRequest|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var BackupCodeStorage|PHPUnit_Framework_MockObject_MockObject */
+ /** @var BackupCodeStorage|\PHPUnit\Framework\MockObject\MockObject */
private $storage;
- /** @var IUserSession|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
private $userSession;
/** @var SettingsController */
);
}
-
+
public function testPrepareWrongApp() {
$this->expectException(\InvalidArgumentException::class);
- /** @var INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
+ /** @var INotification|\PHPUnit\Framework\MockObject\MockObject $notification */
$notification = $this->createMock(INotification::class);
$notification->expects($this->once())
->method('getApp')
$this->notifier->prepare($notification, 'en');
}
-
+
public function testPrepareWrongSubject() {
$this->expectException(\InvalidArgumentException::class);
- /** @var INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
+ /** @var INotification|\PHPUnit\Framework\MockObject\MockObject $notification */
$notification = $this->createMock(INotification::class);
$notification->expects($this->once())
->method('getApp')
}
public function testPrepare() {
- /** @var \OCP\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
+ /** @var \OCP\Notification\INotification|\PHPUnit\Framework\MockObject\MockObject $notification */
$notification = $this->createMock(INotification::class);
$notification->expects($this->once())
use OCP\IL10N;
use OCP\IUser;
use OCP\Template;
-use PHPUnit_Framework_MockObject_MockObject;
use Test\TestCase;
class BackupCodesProviderTest extends TestCase {
/** @var string */
private $appName;
- /** @var BackupCodeStorage|PHPUnit_Framework_MockObject_MockObject */
+ /** @var BackupCodeStorage|\PHPUnit\Framework\MockObject\MockObject */
private $storage;
- /** @var IL10N|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l10n;
- /** @var AppManager|PHPUnit_Framework_MockObject_MockObject */
+ /** @var AppManager|\PHPUnit\Framework\MockObject\MockObject */
private $appManager;
- /** @var IInitialStateService|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IInitialStateService|\PHPUnit\Framework\MockObject\MockObject */
private $initialState;
/** @var BackupCodesProvider */
use OCP\IUser;
use OCP\Security\IHasher;
use OCP\Security\ISecureRandom;
-use PHPUnit_Framework_MockObject_MockObject;
use Test\TestCase;
class BackupCodeStorageTest extends TestCase {
- /** @var BackupCodeMapper|PHPUnit_Framework_MockObject_MockObject */
+ /** @var BackupCodeMapper|\PHPUnit\Framework\MockObject\MockObject */
private $mapper;
- /** @var ISecureRandom|PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISecureRandom|\PHPUnit\Framework\MockObject\MockObject */
private $random;
- /** @var IHasher|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IHasher|\PHPUnit\Framework\MockObject\MockObject */
private $hasher;
- /** @var IEventDispatcher|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IEventDispatcher|\PHPUnit\Framework\MockObject\MockObject */
private $eventDispatcher;
/** @var BackupCodeStorage */
use Test\TestCase;
class AdminControllerTest extends TestCase {
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var IJobList|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IJobList|\PHPUnit\Framework\MockObject\MockObject */
private $jobList;
- /** @var ISecureRandom|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISecureRandom|\PHPUnit\Framework\MockObject\MockObject */
private $secureRandom;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
/** @var AdminController */
private $adminController;
- /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
private $timeFactory;
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l10n;
protected function setUp(): void {
class BackgroundJobTest extends TestCase {
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
protected $notificationManager;
- /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */
protected $groupManager;
- /** @var IAppManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */
protected $appManager;
- /** @var IClientService|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IClientService|\PHPUnit\Framework\MockObject\MockObject */
protected $client;
- /** @var Installer|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Installer|\PHPUnit\Framework\MockObject\MockObject */
protected $installer;
protected function setUp(): void {
/**
* @param array $methods
- * @return BackgroundJob|\PHPUnit_Framework_MockObject_MockObject
+ * @return BackgroundJob|\PHPUnit\Framework\MockObject\MockObject
*/
protected function getJob(array $methods = []) {
if (empty($methods)) {
/**
* @param string[] $userIds
- * @return IUser[]|\PHPUnit_Framework_MockObject_MockObject[]
+ * @return IUser[]|\PHPUnit\Framework\MockObject\MockObject[]
*/
protected function getUsers(array $userIds): array {
$users = [];
/**
* @param string $gid
- * @return \OCP\IGroup|\PHPUnit_Framework_MockObject_MockObject
+ * @return \OCP\IGroup|\PHPUnit\Framework\MockObject\MockObject
*/
protected function getGroup(string $gid) {
$group = $this->createMock(IGroup::class);
class NotifierTest extends TestCase {
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
protected $urlGenerator;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
protected $notificationManager;
- /** @var IFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IFactory|\PHPUnit\Framework\MockObject\MockObject */
protected $l10nFactory;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
protected $userSession;
- /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */
protected $groupManager;
protected function setUp(): void {
/**
* @param array $methods
- * @return Notifier|\PHPUnit_Framework_MockObject_MockObject
+ * @return Notifier|\PHPUnit\Framework\MockObject\MockObject
*/
protected function getNotifier(array $methods = []) {
if (empty($methods)) {
use Test\TestCase;
class ResetTokenBackgroundJobTest extends TestCase {
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
private $timeFactory;
/** @var ResetTokenBackgroundJob */
private $resetTokenBackgroundJob;
use Test\TestCase;
class AdminTest extends TestCase {
- /** @var IFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IFactory|\PHPUnit\Framework\MockObject\MockObject */
protected $l10nFactory;
/** @var Admin */
private $admin;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var UpdateChecker|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var UpdateChecker|\PHPUnit\Framework\MockObject\MockObject */
private $updateChecker;
- /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */
private $groupManager;
- /** @var IDateTimeFormatter|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IDateTimeFormatter|\PHPUnit\Framework\MockObject\MockObject */
private $dateTimeFormatter;
- /** @var IRegistry|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRegistry|\PHPUnit\Framework\MockObject\MockObject */
private $subscriptionRegistry;
protected function setUp(): void {
use Test\TestCase;
class UpdateCheckerTest extends TestCase {
- /** @var ChangesCheck|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ChangesCheck|\PHPUnit\Framework\MockObject\MockObject */
protected $changesChecker;
- /** @var VersionCheck|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var VersionCheck|\PHPUnit\Framework\MockObject\MockObject */
private $updater;
/** @var UpdateChecker */
private $updateChecker;
* @package OCA\User_LDAP\Tests
*/
class AccessTest extends TestCase {
- /** @var UserMapping|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var UserMapping|\PHPUnit\Framework\MockObject\MockObject */
protected $userMapper;
- /** @var Connection|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Connection|\PHPUnit\Framework\MockObject\MockObject */
private $connection;
- /** @var LDAP|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var LDAP|\PHPUnit\Framework\MockObject\MockObject */
private $ldap;
- /** @var Manager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Manager|\PHPUnit\Framework\MockObject\MockObject */
private $userManager;
- /** @var Helper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Helper|\PHPUnit\Framework\MockObject\MockObject */
private $helper;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
private $ncUserManager;
/** @var Access */
private $access;
*/
public function testStringResemblesDN($case) {
list($lw, $con, $um, $helper) = $this->getConnectorAndLdapMock();
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject $config */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject $config */
$config = $this->createMock(IConfig::class);
$access = new Access($con, $lw, $um, $helper, $config, $this->ncUserManager);
*/
public function testStringResemblesDNLDAPmod($case) {
list(, $con, $um, $helper) = $this->getConnectorAndLdapMock();
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject $config */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject $config */
$config = $this->createMock(IConfig::class);
$lw = new LDAP();
$access = new Access($con, $lw, $um, $helper, $config, $this->ncUserManager);
->method('getAttributes')
->willReturn(['displayname' => ['bar', 'count' => 1]]);
- /** @var UserMapping|\PHPUnit_Framework_MockObject_MockObject $mapperMock */
+ /** @var UserMapping|\PHPUnit\Framework\MockObject\MockObject $mapperMock */
$mapperMock = $this->createMock(UserMapping::class);
$mapperMock->expects($this->any())
->method('getNameByDN')
}
public function testBatchApplyUserAttributesSkipped() {
- /** @var UserMapping|\PHPUnit_Framework_MockObject_MockObject $mapperMock */
+ /** @var UserMapping|\PHPUnit\Framework\MockObject\MockObject $mapperMock */
$mapperMock = $this->createMock(UserMapping::class);
$mapperMock->expects($this->any())
->method('getNameByDN')
}
public function testBatchApplyUserAttributesDontSkip() {
- /** @var UserMapping|\PHPUnit_Framework_MockObject_MockObject $mapperMock */
+ /** @var UserMapping|\PHPUnit\Framework\MockObject\MockObject $mapperMock */
$mapperMock = $this->createMock(UserMapping::class);
$mapperMock->expects($this->any())
->method('getNameByDN')
*/
public function testSanitizeDN($attribute) {
list($lw, $con, $um, $helper) = $this->getConnectorAndLdapMock();
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject $config */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject $config */
$config = $this->createMock(IConfig::class);
$dnFromServer = 'cn=Mixed Cases,ou=Are Sufficient To,ou=Test,dc=example,dc=org';
->with('detta')
->willReturnOnConsecutiveCalls($offlineUserMock, $regularUserMock);
- /** @var UserMapping|\PHPUnit_Framework_MockObject_MockObject $mapperMock */
+ /** @var UserMapping|\PHPUnit\Framework\MockObject\MockObject $mapperMock */
$mapperMock = $this->createMock(UserMapping::class);
$mapperMock->expects($this->any())
->method('getNameByDN')
* @package OCA\User_LDAP\Tests
*/
class ConnectionTest extends \Test\TestCase {
- /** @var \OCA\User_LDAP\ILDAPWrapper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCA\User_LDAP\ILDAPWrapper|\PHPUnit\Framework\MockObject\MockObject */
protected $ldap;
/** @var Connection */
class HelperTest extends \Test\TestCase {
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
/** @var Helper */
/** @var array */
protected $arguments;
- /** @var Helper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Helper|\PHPUnit\Framework\MockObject\MockObject */
protected $helper;
- /** @var LDAP|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var LDAP|\PHPUnit\Framework\MockObject\MockObject */
protected $ldapWrapper;
- /** @var Manager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Manager|\PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
- /** @var UserMapping|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var UserMapping|\PHPUnit\Framework\MockObject\MockObject */
protected $mapper;
/** @var Sync */
protected $sync;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var IAvatarManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAvatarManager|\PHPUnit\Framework\MockObject\MockObject */
protected $avatarManager;
- /** @var IDBConnection|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IDBConnection|\PHPUnit\Framework\MockObject\MockObject */
protected $dbc;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
protected $ncUserManager;
- /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
protected $notificationManager;
- /** @var ConnectionFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ConnectionFactory|\PHPUnit\Framework\MockObject\MockObject */
protected $connectionFactory;
- /** @var AccessFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var AccessFactory|\PHPUnit\Framework\MockObject\MockObject */
protected $accessFactory;
protected function setUp(): void {
return null;
});
- /** @var Access|\PHPUnit_Framework_MockObject_MockObject $access */
+ /** @var Access|\PHPUnit\Framework\MockObject\MockObject $access */
$access = $this->createMock(Access::class);
$this->accessFactory->expects($this->any())
->method('get')
return null;
});
- /** @var Access|\PHPUnit_Framework_MockObject_MockObject $access */
+ /** @var Access|\PHPUnit\Framework\MockObject\MockObject $access */
$access = $this->createMock(Access::class);
$this->accessFactory->expects($this->any())
->method('get')
use Test\TestCase;
class LDAPTest extends TestCase {
- /** @var LDAP|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var LDAP|\PHPUnit\Framework\MockObject\MockObject */
private $ldap;
protected function setUp(): void {
use Test\TestCase;
abstract class AbstractUUIDFixTest extends TestCase {
- /** @var Helper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Helper|\PHPUnit\Framework\MockObject\MockObject */
protected $helper;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var LDAP|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var LDAP|\PHPUnit\Framework\MockObject\MockObject */
protected $ldap;
- /** @var UserMapping|GroupMapping|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var UserMapping|GroupMapping|\PHPUnit\Framework\MockObject\MockObject */
protected $mapper;
/** @var UUIDFixUser */
protected $job;
- /** @var User_Proxy|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var User_Proxy|\PHPUnit\Framework\MockObject\MockObject */
protected $proxy;
- /** @var Access|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Access|\PHPUnit\Framework\MockObject\MockObject */
protected $access;
/** @var bool */
use Test\TestCase;
class UUIDFixInsertTest extends TestCase {
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var UserMapping|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var UserMapping|\PHPUnit\Framework\MockObject\MockObject */
protected $userMapper;
- /** @var GroupMapping|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var GroupMapping|\PHPUnit\Framework\MockObject\MockObject */
protected $groupMapper;
- /** @var IJobList|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IJobList|\PHPUnit\Framework\MockObject\MockObject */
protected $jobList;
/** @var UUIDFixInsert */
use Test\TestCase;
class SectionTest extends TestCase {
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
private $url;
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l;
/** @var Section */
private $section;
/** @var IDBConnection */
protected $db;
- /** @var UserMapping|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var UserMapping|\PHPUnit\Framework\MockObject\MockObject */
protected $mapping;
protected function setUp(): void {
* @package OCA\User_LDAP\Tests\User
*/
class ManagerTest extends \Test\TestCase {
- /** @var Access|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Access|\PHPUnit\Framework\MockObject\MockObject */
protected $access;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var FilesystemHelper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var FilesystemHelper|\PHPUnit\Framework\MockObject\MockObject */
protected $fileSystemHelper;
- /** @var LogWrapper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var LogWrapper|\PHPUnit\Framework\MockObject\MockObject */
protected $log;
- /** @var IAvatarManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAvatarManager|\PHPUnit\Framework\MockObject\MockObject */
protected $avatarManager;
- /** @var Image|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Image|\PHPUnit\Framework\MockObject\MockObject */
protected $image;
- /** @var IDBConnection|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IDBConnection|\PHPUnit\Framework\MockObject\MockObject */
protected $dbc;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
protected $ncUserManager;
- /** @var INotificationManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var INotificationManager|\PHPUnit\Framework\MockObject\MockObject */
protected $notificationManager;
- /** @var ILDAPWrapper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILDAPWrapper|\PHPUnit\Framework\MockObject\MockObject */
protected $ldapWrapper;
/** @var Connection */
* @package OCA\User_LDAP\Tests\User
*/
class UserTest extends \Test\TestCase {
- /** @var Access|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Access|\PHPUnit\Framework\MockObject\MockObject */
protected $access;
- /** @var Connection|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Connection|\PHPUnit\Framework\MockObject\MockObject */
protected $connection;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var FilesystemHelper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var FilesystemHelper|\PHPUnit\Framework\MockObject\MockObject */
protected $filesystemhelper;
- /** @var INotificationManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var INotificationManager|\PHPUnit\Framework\MockObject\MockObject */
protected $notificationManager;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
- /** @var Image|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Image|\PHPUnit\Framework\MockObject\MockObject */
protected $image;
- /** @var IAvatarManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAvatarManager|\PHPUnit\Framework\MockObject\MockObject */
protected $avatarManager;
- /** @var LogWrapper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var LogWrapper|\PHPUnit\Framework\MockObject\MockObject */
protected $log;
/** @var string */
protected $uid = 'alice';
'updateExtStorageHome',
];
- /** @var User|\PHPUnit_Framework_MockObject_MockObject $userMock */
+ /** @var User|\PHPUnit\Framework\MockObject\MockObject $userMock */
$userMock = $this->getMockBuilder(User::class)
->setConstructorArgs([
$this->uid,
class User_LDAPTest extends TestCase {
/** @var User_LDAP */
protected $backend;
- /** @var Access|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Access|\PHPUnit\Framework\MockObject\MockObject */
protected $access;
- /** @var OfflineUser|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var OfflineUser|\PHPUnit\Framework\MockObject\MockObject */
protected $offlineUser;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var INotificationManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var INotificationManager|\PHPUnit\Framework\MockObject\MockObject */
protected $notificationManager;
- /** @var Session|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Session|\PHPUnit\Framework\MockObject\MockObject */
protected $session;
- /** @var UserPluginManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var UserPluginManager|\PHPUnit\Framework\MockObject\MockObject */
protected $pluginManager;
- /** @var Connection|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Connection|\PHPUnit\Framework\MockObject\MockObject */
protected $connection;
- /** @var Manager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Manager|\PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
protected function setUp(): void {
use Test\TestCase;
class User_ProxyTest extends TestCase {
- /** @var ILDAPWrapper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILDAPWrapper|\PHPUnit\Framework\MockObject\MockObject */
private $ldapWrapper;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var INotificationManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var INotificationManager|\PHPUnit\Framework\MockObject\MockObject */
private $notificationManager;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
private $userSession;
- /** @var User_Proxy|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var User_Proxy|\PHPUnit\Framework\MockObject\MockObject */
private $proxy;
- /** @var UserPluginManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var UserPluginManager|\PHPUnit\Framework\MockObject\MockObject */
private $userPluginManager;
protected function setUp(): void {
$connMethods = get_class_methods('\OCA\User_LDAP\Connection');
$accMethods = get_class_methods('\OCA\User_LDAP\Access');
}
- /** @var ILDAPWrapper|\PHPUnit_Framework_MockObject_MockObject $lw */
+ /** @var ILDAPWrapper|\PHPUnit\Framework\MockObject\MockObject $lw */
$lw = $this->createMock(ILDAPWrapper::class);
- /** @var Configuration|\PHPUnit_Framework_MockObject_MockObject $conf */
+ /** @var Configuration|\PHPUnit\Framework\MockObject\MockObject $conf */
$conf = $this->getMockBuilder(Configuration::class)
->setMethods($confMethods)
->setConstructorArgs([$lw, null, null])
->getMock();
- /** @var Access|\PHPUnit_Framework_MockObject_MockObject $access */
+ /** @var Access|\PHPUnit\Framework\MockObject\MockObject $access */
$access = $this->createMock(Access::class);
return [new Wizard($conf, $lw, $access), $conf, $lw, $access];
class RequestRemoteAddressTest extends \Test\TestCase {
- /** @var \OCP\IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IRequest|\PHPUnit\Framework\MockObject\MockObject */
protected $request;
/**
- * @return \OCP\IL10N|\PHPUnit_Framework_MockObject_MockObject
+ * @return \OCP\IL10N|\PHPUnit\Framework\MockObject\MockObject
*/
protected function getL10NMock() {
$l = $this->getMockBuilder(IL10N::class)
class RequestTimeTest extends \Test\TestCase {
- /** @var \OCP\AppFramework\Utility\ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\AppFramework\Utility\ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
protected $timeFactory;
/**
- * @return \OCP\IL10N|\PHPUnit_Framework_MockObject_MockObject
+ * @return \OCP\IL10N|\PHPUnit\Framework\MockObject\MockObject
*/
protected function getL10NMock() {
$l = $this->getMockBuilder(IL10N::class)
class RequestUserAgentTest extends TestCase {
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
protected $request;
/** @var RequestUserAgent */
parent::setUp();
$this->request = $this->createMock(IRequest::class);
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject $l */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject $l */
$l = $this->getMockBuilder(IL10N::class)
->disableOriginalConstructor()
->getMock();
use Test\TestCase;
class DeleteConfigTest extends TestCase {
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleInput;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleOutput;
/** @var \Symfony\Component\Console\Command\Command */
use Test\TestCase;
class GetConfigTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleInput;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleOutput;
/** @var \Symfony\Component\Console\Command\Command */
use Test\TestCase;
class SetConfigTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleInput;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleOutput;
/** @var \Symfony\Component\Console\Command\Command */
use Test\TestCase;
class ImportTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleInput;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleOutput;
/** @var \Symfony\Component\Console\Command\Command */
use Test\TestCase;
class ListConfigsTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $appConfig;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $systemConfig;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleInput;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleOutput;
/** @var \Symfony\Component\Console\Command\Command */
use Test\TestCase;
class DeleteConfigTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $systemConfig;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleInput;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleOutput;
/** @var \Symfony\Component\Console\Command\Command */
use Test\TestCase;
class GetConfigTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $systemConfig;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleInput;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleOutput;
/** @var \Symfony\Component\Console\Command\Command */
use Test\TestCase;
class SetConfigTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $systemConfig;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleInput;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleOutput;
/** @var \Symfony\Component\Console\Command\Command */
/** @var ChangeKeyStorageRoot */
protected $changeKeyStorageRoot;
- /** @var View | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var View | \PHPUnit\Framework\MockObject\MockObject */
protected $view;
- /** @var IUserManager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager | \PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
- /** @var IConfig | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var Util | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var Util | \PHPUnit\Framework\MockObject\MockObject */
protected $util;
- /** @var QuestionHelper | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var QuestionHelper | \PHPUnit\Framework\MockObject\MockObject */
protected $questionHelper;
- /** @var InputInterface | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var InputInterface | \PHPUnit\Framework\MockObject\MockObject */
protected $inputInterface;
- /** @var OutputInterface | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var OutputInterface | \PHPUnit\Framework\MockObject\MockObject */
protected $outputInterface;
- /** @var \OCP\UserInterface | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\UserInterface | \PHPUnit\Framework\MockObject\MockObject */
protected $userInterface;
protected function setUp(): void {
);
}
-
+
public function testTargetExistsException() {
$this->expectException(\Exception::class);
class DecryptAllTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\IConfig */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\IConfig */
protected $config;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\Encryption\IManager */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\Encryption\IManager */
protected $encryptionManager;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\App\IAppManager */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\App\IAppManager */
protected $appManager;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \Symfony\Component\Console\Input\InputInterface */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Input\InputInterface */
protected $consoleInput;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \Symfony\Component\Console\Output\OutputInterface */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Output\OutputInterface */
protected $consoleOutput;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \Symfony\Component\Console\Helper\QuestionHelper */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Helper\QuestionHelper */
protected $questionHelper;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OC\Encryption\DecryptAll */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OC\Encryption\DecryptAll */
protected $decryptAll;
protected function setUp(): void {
];
}
-
+
public function testExecuteFailure() {
$this->expectException(\Exception::class);
use Test\TestCase;
class DisableTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleInput;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleOutput;
/** @var \Symfony\Component\Console\Command\Command */
use Test\TestCase;
class EnableTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $manager;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleInput;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleOutput;
/** @var \Symfony\Component\Console\Command\Command */
class EncryptAllTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\IConfig */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\IConfig */
protected $config;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\Encryption\IManager */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\Encryption\IManager */
protected $encryptionManager;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\App\IAppManager */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\App\IAppManager */
protected $appManager;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \Symfony\Component\Console\Input\InputInterface */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Input\InputInterface */
protected $consoleInput;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \Symfony\Component\Console\Output\OutputInterface */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Output\OutputInterface */
protected $consoleOutput;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \Symfony\Component\Console\Helper\QuestionHelper */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Helper\QuestionHelper */
protected $questionHelper;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\Encryption\IEncryptionModule */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\Encryption\IEncryptionModule */
protected $encryptionModule;
/** @var EncryptAll */
];
}
-
+
public function testExecuteException() {
$this->expectException(\Exception::class);
use Test\TestCase;
class SetDefaultModuleTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject|IManager */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IManager */
protected $manager;
- /** @var \PHPUnit_Framework_MockObject_MockObject|IConfig */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IConfig */
protected $config;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleInput;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleOutput;
/** @var \Symfony\Component\Console\Command\Command */
class AddTest extends TestCase {
- /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */
private $groupManager;
/** @var Add */
private $command;
- /** @var InputInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var InputInterface|\PHPUnit\Framework\MockObject\MockObject */
private $input;
- /** @var OutputInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var OutputInterface|\PHPUnit\Framework\MockObject\MockObject */
private $output;
protected function setUp(): void {
class AddUserTest extends TestCase {
- /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */
private $groupManager;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
private $userManager;
/** @var AddUser */
private $command;
- /** @var InputInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var InputInterface|\PHPUnit\Framework\MockObject\MockObject */
private $input;
- /** @var OutputInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var OutputInterface|\PHPUnit\Framework\MockObject\MockObject */
private $output;
protected function setUp(): void {
class DeleteTest extends TestCase {
- /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */
private $groupManager;
/** @var Delete */
private $command;
- /** @var InputInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var InputInterface|\PHPUnit\Framework\MockObject\MockObject */
private $input;
- /** @var OutputInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var OutputInterface|\PHPUnit\Framework\MockObject\MockObject */
private $output;
protected function setUp(): void {
class ListCommandTest extends TestCase {
- /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */
private $groupManager;
- /** @var ListCommand|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ListCommand|\PHPUnit\Framework\MockObject\MockObject */
private $command;
- /** @var InputInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var InputInterface|\PHPUnit\Framework\MockObject\MockObject */
private $input;
- /** @var OutputInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var OutputInterface|\PHPUnit\Framework\MockObject\MockObject */
private $output;
protected function setUp(): void {
class RemoveUserTest extends TestCase {
- /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */
private $groupManager;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
private $userManager;
/** @var RemoveUser */
private $command;
- /** @var InputInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var InputInterface|\PHPUnit\Framework\MockObject\MockObject */
private $input;
- /** @var OutputInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var OutputInterface|\PHPUnit\Framework\MockObject\MockObject */
private $output;
protected function setUp(): void {
use Test\TestCase;
class FileTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleInput;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleOutput;
/** @var \Symfony\Component\Console\Command\Command */
use Test\TestCase;
class ManageTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleInput;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleOutput;
/** @var \Symfony\Component\Console\Command\Command */
self::invokePrivate($this->command, 'execute', [$this->consoleInput, $this->consoleOutput]);
}
-
+
public function testValidateBackend() {
$this->expectException(\InvalidArgumentException::class);
self::invokePrivate($this->command, 'validateBackend', ['notabackend']);
}
-
+
public function testValidateTimezone() {
$this->expectException(\Exception::class);
);
}
-
+
public function testConvertLevelStringInvalid() {
$this->expectException(\InvalidArgumentException::class);
);
}
-
+
public function testConvertLevelNumberInvalid() {
$this->expectException(\InvalidArgumentException::class);
use Test\TestCase;
class DataFingerprintTest extends TestCase {
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleInput;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleOutput;
- /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
protected $timeFactory;
/** @var \Symfony\Component\Console\Command\Command */
/** @var IMimeTypeLoader */
protected $loader;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleInput;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleOutput;
/** @var \Symfony\Component\Console\Command\Command */
protected $cacheFactory;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleInput;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleOutput;
/** @var \Symfony\Component\Console\Command\Command */
use Test\TestCase;
class DeleteTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleInput;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleOutput;
/** @var \Symfony\Component\Console\Command\Command */
use Test\TestCase;
class DisableTest extends TestCase {
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
- /** @var InputInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var InputInterface|\PHPUnit\Framework\MockObject\MockObject */
protected $consoleInput;
- /** @var OutputInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var OutputInterface|\PHPUnit\Framework\MockObject\MockObject */
protected $consoleOutput;
/** @var Disable */
use Test\TestCase;
class EnableTest extends TestCase {
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
- /** @var InputInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var InputInterface|\PHPUnit\Framework\MockObject\MockObject */
protected $consoleInput;
- /** @var OutputInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var OutputInterface|\PHPUnit\Framework\MockObject\MockObject */
protected $consoleOutput;
/** @var Disable */
use Test\TestCase;
class LastSeenTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleInput;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $consoleOutput;
/** @var \Symfony\Component\Console\Command\Command */
use Test\TestCase;
class SettingTest extends TestCase {
- /** @var \OCP\IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IUserManager|\PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
- /** @var \OCP\IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var \OCP\IDBConnection|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IDBConnection|\PHPUnit\Framework\MockObject\MockObject */
protected $connection;
- /** @var \Symfony\Component\Console\Input\InputInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \Symfony\Component\Console\Input\InputInterface|\PHPUnit\Framework\MockObject\MockObject */
protected $consoleInput;
- /** @var \Symfony\Component\Console\Output\OutputInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \Symfony\Component\Console\Output\OutputInterface|\PHPUnit\Framework\MockObject\MockObject */
protected $consoleOutput;
protected function setUp(): void {
/** @var IRequest|MockObject */
private $request;
- /** @var EventDispatcherInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject */
private $eventDispatcher;
/** @var AppPasswordController */
class AvatarControllerTest extends \Test\TestCase {
/** @var AvatarController */
private $avatarController;
- /** @var IAvatar|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAvatar|\PHPUnit\Framework\MockObject\MockObject */
private $avatarMock;
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject */
private $userMock;
- /** @var File|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var File|\PHPUnit\Framework\MockObject\MockObject */
private $avatarFile;
- /** @var IAvatarManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAvatarManager|\PHPUnit\Framework\MockObject\MockObject */
private $avatarManager;
- /** @var ICache|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICache|\PHPUnit\Framework\MockObject\MockObject */
private $cache;
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
private $userManager;
- /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */
private $rootFolder;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
private $logger;
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var TimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var TimeFactory|\PHPUnit\Framework\MockObject\MockObject */
private $timeFactory;
/** @var IAccountManager|MockObject */
private $accountManager;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\JSONResponse;
use OCP\IRequest;
-use PHPUnit_Framework_MockObject_MockObject;
use Test\TestCase;
class CSRFTokenControllerTest extends TestCase {
/** @var CSRFTokenController */
private $controller;
- /** @var IRequest|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var CsrfTokenManager|PHPUnit_Framework_MockObject_MockObject */
+ /** @var CsrfTokenManager|\PHPUnit\Framework\MockObject\MockObject */
private $tokenManager;
protected function setUp(): void {
private $userId = 'currentUser';
/** @var string */
private $loginName = 'ua1337';
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
private $userManager;
- /** @var Session|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Session|\PHPUnit\Framework\MockObject\MockObject */
private $userSession;
- /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */
private $groupManager;
- /** @var IAppManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */
private $appManager;
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l;
/** @var ChangePasswordController */
private $controller;
$this->l = $this->createMock(IL10N::class);
$this->l->method('t')->willReturnArgument(0);
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject $request */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject $request */
$request = $this->createMock(IRequest::class);
$this->controller = new ChangePasswordController(
use Test\TestCase;
class ClientFlowLoginControllerTest extends TestCase {
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
private $userSession;
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l10n;
- /** @var Defaults|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Defaults|\PHPUnit\Framework\MockObject\MockObject */
private $defaults;
- /** @var ISession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISession|\PHPUnit\Framework\MockObject\MockObject */
private $session;
- /** @var IProvider|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IProvider|\PHPUnit\Framework\MockObject\MockObject */
private $tokenProvider;
- /** @var ISecureRandom|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISecureRandom|\PHPUnit\Framework\MockObject\MockObject */
private $random;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
private $urlGenerator;
- /** @var ClientMapper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ClientMapper|\PHPUnit\Framework\MockObject\MockObject */
private $clientMapper;
- /** @var AccessTokenMapper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var AccessTokenMapper|\PHPUnit\Framework\MockObject\MockObject */
private $accessTokenMapper;
- /** @var ICrypto|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICrypto|\PHPUnit\Framework\MockObject\MockObject */
private $crypto;
- /** @var EventDispatcherInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject */
private $eventDispatcher;
use OCP\IRequest;
use OCP\IUser;
use OCP\IUserSession;
-use PHPUnit_Framework_MockObject_MockObject;
use Test\TestCase;
class ContactsMenuControllerTest extends TestCase {
- /** @var IRequest|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var IUserSession|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
private $userSession;
- /** @var Manager|PHPUnit_Framework_MockObject_MockObject */
+ /** @var Manager|\PHPUnit\Framework\MockObject\MockObject */
private $contactsManager;
/** @var ContactsMenuController */
class CssControllerTest extends TestCase {
- /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */
private $appData;
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
/** @var CssController */
protected function setUp(): void {
parent::setUp();
- /** @var Factory|\PHPUnit_Framework_MockObject_MockObject $factory */
+ /** @var Factory|\PHPUnit\Framework\MockObject\MockObject $factory */
$factory = $this->createMock(Factory::class);
$this->appData = $this->createMock(AppData::class);
$factory->expects($this->once())
->with('css')
->willReturn($this->appData);
- /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject $timeFactory */
+ /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject $timeFactory */
$timeFactory = $this->createMock(ITimeFactory::class);
$timeFactory->method('getTime')
->willReturn(1337);
private $guestAvatarController;
/**
- * @var IRequest|\PHPUnit_Framework_MockObject_MockObject
+ * @var IRequest|\PHPUnit\Framework\MockObject\MockObject
*/
private $request;
/**
- * @var IAvatarManager|\PHPUnit_Framework_MockObject_MockObject
+ * @var IAvatarManager|\PHPUnit\Framework\MockObject\MockObject
*/
private $avatarManager;
/**
- * @var IAvatar|\PHPUnit_Framework_MockObject_MockObject
+ * @var IAvatar|\PHPUnit\Framework\MockObject\MockObject
*/
private $avatar;
/**
- * @var \OCP\Files\File|\PHPUnit_Framework_MockObject_MockObject
+ * @var \OCP\Files\File|\PHPUnit\Framework\MockObject\MockObject
*/
private $file;
/**
- * @var ILogger|\PHPUnit_Framework_MockObject_MockObject
+ * @var ILogger|\PHPUnit\Framework\MockObject\MockObject
*/
private $logger;
class JsControllerTest extends TestCase {
- /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */
private $appData;
/** @var JsController */
private $controller;
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
protected function setUp(): void {
parent::setUp();
- /** @var Factory|\PHPUnit_Framework_MockObject_MockObject $factory */
+ /** @var Factory|\PHPUnit\Framework\MockObject\MockObject $factory */
$factory = $this->createMock(Factory::class);
$this->appData = $this->createMock(AppData::class);
$factory->expects($this->once())
->with('js')
->willReturn($this->appData);
- /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject $timeFactory */
+ /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject $timeFactory */
$timeFactory = $this->createMock(ITimeFactory::class);
$timeFactory->method('getTime')
->willReturn(1337);
use OCP\Mail\IMailer;
use OCP\Security\ICrypto;
use OCP\Security\ISecureRandom;
-use PHPUnit_Framework_MockObject_MockObject;
/**
* Class LostControllerTest
private $lostController;
/** @var IUser */
private $existingUser;
- /** @var IURLGenerator | PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator | \PHPUnit\Framework\MockObject\MockObject */
private $urlGenerator;
/** @var IL10N */
private $l10n;
- /** @var IUserManager | PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager | \PHPUnit\Framework\MockObject\MockObject */
private $userManager;
/** @var Defaults */
private $defaults;
- /** @var IConfig | PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var IMailer | PHPUnit_Framework_MockObject_MockObject */
+ /** @var IMailer | \PHPUnit\Framework\MockObject\MockObject */
private $mailer;
- /** @var ISecureRandom | PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISecureRandom | \PHPUnit\Framework\MockObject\MockObject */
private $secureRandom;
- /** @var IManager|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
private $encryptionManager;
- /** @var ITimeFactory | PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITimeFactory | \PHPUnit\Framework\MockObject\MockObject */
private $timeFactory;
- /** @var IRequest */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var ICrypto|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICrypto|\PHPUnit\Framework\MockObject\MockObject */
private $crypto;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
private $logger;
- /** @var Manager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Manager|\PHPUnit\Framework\MockObject\MockObject */
private $twofactorManager;
- /** @var IInitialStateService|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IInitialStateService|\PHPUnit\Framework\MockObject\MockObject */
private $initialStateService;
protected function setUp(): void {
}
public function testSetPasswordEncryptionDontProceedPerUserKey() {
- /** @var IEncryptionModule|PHPUnit_Framework_MockObject_MockObject $encryptionModule */
+ /** @var IEncryptionModule|\PHPUnit\Framework\MockObject\MockObject $encryptionModule */
$encryptionModule = $this->createMock(IEncryptionModule::class);
$encryptionModule->expects($this->once())->method('needDetailedAccessList')->willReturn(true);
$this->encryptionManager->expects($this->once())->method('getEncryptionModules')
class NavigationControllerTest extends TestCase {
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var INavigationManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var INavigationManager|\PHPUnit\Framework\MockObject\MockObject */
private $navigationManager;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
private $urlGenerator;
/** @var NavigationController */
use Test\TestCase;
class OCSControllerTest extends TestCase {
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var CapabilitiesManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var CapabilitiesManager|\PHPUnit\Framework\MockObject\MockObject */
private $capabilitiesManager;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
private $userSession;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
private $userManager;
- /** @var Manager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Manager|\PHPUnit\Framework\MockObject\MockObject */
private $keyManager;
/** @var OCSController */
private $controller;
class PreviewControllerTest extends \Test\TestCase {
- /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */
private $rootFolder;
/** @var string */
private $userId;
- /** @var IPreview|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IPreview|\PHPUnit\Framework\MockObject\MockObject */
private $previewManager;
- /** @var PreviewController|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var PreviewController|\PHPUnit\Framework\MockObject\MockObject */
private $controller;
protected function setUp(): void {
self::TEST_IMAGE_RECT,
];
- /** @var IAppManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */
private $appManager;
/**
use OCP\IUser;
use OCP\IUserSession;
use OCP\Template;
-use PHPUnit_Framework_MockObject_MockObject;
use Test\TestCase;
class TwoFactorChallengeControllerTest extends TestCase {
- /** @var IRequest|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var Manager|PHPUnit_Framework_MockObject_MockObject */
+ /** @var Manager|\PHPUnit\Framework\MockObject\MockObject */
private $twoFactorManager;
- /** @var IUserSession|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
private $userSession;
- /** @var ISession|PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISession|\PHPUnit\Framework\MockObject\MockObject */
private $session;
- /** @var IURLGenerator|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
private $urlGenerator;
- /** @var TwoFactorChallengeController|PHPUnit_Framework_MockObject_MockObject */
+ /** @var TwoFactorChallengeController|\PHPUnit\Framework\MockObject\MockObject */
private $controller;
protected function setUp(): void {
class UserControllerTest extends TestCase {
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
private $userManager;
/** @var UserController */
*/
class HooksTest extends TestCase {
- /** @var ILogger | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger | \PHPUnit\Framework\MockObject\MockObject */
private $logger;
- /** @var AccountManager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var AccountManager | \PHPUnit\Framework\MockObject\MockObject */
private $accountManager;
- /** @var Hooks | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var Hooks | \PHPUnit\Framework\MockObject\MockObject */
private $hooks;
protected function setUp(): void {
/** @var \OC\Activity\Manager */
private $activityManager;
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
protected $request;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
protected $session;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var IValidator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IValidator|\PHPUnit\Framework\MockObject\MockObject */
protected $validator;
protected function setUp(): void {
$this->assertNotEmpty($consumers);
}
-
+
public function testGetConsumersInvalidConsumer() {
$this->expectException(\InvalidArgumentException::class);
->willReturn($mockUser);
}
-
+
public function testPublishExceptionNoApp() {
$this->expectException(\BadMethodCallException::class);
$this->activityManager->publish($event);
}
-
+
public function testPublishExceptionNoType() {
$this->expectException(\BadMethodCallException::class);
$this->activityManager->publish($event);
}
-
+
public function testPublishExceptionNoAffectedUser() {
$this->expectException(\BadMethodCallException::class);
$this->activityManager->publish($event);
}
-
+
public function testPublishExceptionNoSubject() {
$this->expectException(\BadMethodCallException::class);
use Test\TestCase;
abstract class BundleBase extends TestCase {
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
protected $l10n;
/** @var Bundle */
protected $bundle;
use Test\TestCase;
class BundleFetcherTest extends TestCase {
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l10n;
/** @var BundleFetcher */
private $bundleFetcher;
use OCP\Http\Client\IResponse;
use OCP\IConfig;
use OCP\ILogger;
-use PHPUnit_Framework_MockObject_MockObject;
use Test\TestCase;
class AppFetcherTest extends TestCase {
- /** @var IAppData|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */
protected $appData;
- /** @var IClientService|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IClientService|\PHPUnit\Framework\MockObject\MockObject */
protected $clientService;
- /** @var ITimeFactory|PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
protected $timeFactory;
- /** @var IConfig|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var CompareVersion|PHPUnit_Framework_MockObject_MockObject */
+ /** @var CompareVersion|\PHPUnit\Framework\MockObject\MockObject */
protected $compareVersion;
- /** @var ILogger|PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
protected $logger;
/** @var AppFetcher */
protected $fetcher;
protected function setUp(): void {
parent::setUp();
- /** @var Factory|PHPUnit_Framework_MockObject_MockObject $factory */
+ /** @var Factory|\PHPUnit\Framework\MockObject\MockObject $factory */
$factory = $this->createMock(Factory::class);
$this->appData = $this->createMock(AppData::class);
$factory->expects($this->once())
use Test\TestCase;
abstract class FetcherBase extends TestCase {
- /** @var Factory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Factory|\PHPUnit\Framework\MockObject\MockObject */
protected $appDataFactory;
- /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */
protected $appData;
- /** @var IClientService|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IClientService|\PHPUnit\Framework\MockObject\MockObject */
protected $clientService;
- /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
protected $timeFactory;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
protected $logger;
/** @var Fetcher */
protected $fetcher;
class DependencyAnalyzerTest extends TestCase {
- /** @var Platform|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Platform|\PHPUnit\Framework\MockObject\MockObject */
private $platformMock;
/** @var IL10N */
}
public function testGetFilteredValues() {
- /** @var \OC\AppConfig|\PHPUnit_Framework_MockObject_MockObject $config */
+ /** @var \OC\AppConfig|\PHPUnit\Framework\MockObject\MockObject $config */
$config = $this->getMockBuilder(\OC\AppConfig::class)
->setConstructorArgs([\OC::$server->getDatabaseConnection()])
->setMethods(['getValues'])
class AuthPublicShareControllerTest extends \Test\TestCase {
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var ISession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISession|\PHPUnit\Framework\MockObject\MockObject */
private $session;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
private $urlGenerator;
- /** @var AuthPublicShareController|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var AuthPublicShareController|\PHPUnit\Framework\MockObject\MockObject */
private $controller;
class PublicShareControllerTest extends \Test\TestCase {
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var ISession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISession|\PHPUnit\Framework\MockObject\MockObject */
private $session;
- /** @var PublicShareController|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var PublicShareController|\PHPUnit\Framework\MockObject\MockObject */
private $controller;
*/
class DIContainerTest extends \Test\TestCase {
- /** @var DIContainer|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var DIContainer|\PHPUnit\Framework\MockObject\MockObject */
private $container;
protected function setUp(): void {
use OCP\Files\File;
class FileDisplayResponseTest extends \Test\TestCase {
- /** @var File|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var File|\PHPUnit\Framework\MockObject\MockObject */
private $file;
/** @var FileDisplayResponse */
class PublicShareMiddlewareTest extends \Test\TestCase {
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var ISession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISession|\PHPUnit\Framework\MockObject\MockObject */
private $session;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
/** @var PublicShareMiddleware */
use Test\TestCase;
class BruteForceMiddlewareTest extends TestCase {
- /** @var ControllerMethodReflector|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ControllerMethodReflector|\PHPUnit\Framework\MockObject\MockObject */
private $reflector;
- /** @var Throttler|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Throttler|\PHPUnit\Framework\MockObject\MockObject */
private $throttler;
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
/** @var BruteForceMiddleware */
private $bruteForceMiddleware;
->method('sleepDelay')
->with('127.0.0.1', 'login');
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
$this->bruteForceMiddleware->beforeController($controller, 'testMethod');
}
->expects($this->never())
->method('sleepDelay');
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
$this->bruteForceMiddleware->beforeController($controller, 'testMethod');
}
public function testAfterControllerWithAnnotationAndThrottledRequest() {
- /** @var Response|\PHPUnit_Framework_MockObject_MockObject $response */
+ /** @var Response|\PHPUnit\Framework\MockObject\MockObject $response */
$response = $this->createMock(Response::class);
$this->reflector
->expects($this->once())
->method('registerAttempt')
->with('login', '127.0.0.1');
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
$this->bruteForceMiddleware->afterController($controller, 'testMethod' ,$response);
}
public function testAfterControllerWithAnnotationAndNotThrottledRequest() {
- /** @var Response|\PHPUnit_Framework_MockObject_MockObject $response */
+ /** @var Response|\PHPUnit\Framework\MockObject\MockObject $response */
$response = $this->createMock(Response::class);
$this->reflector
->expects($this->once())
->expects($this->never())
->method('registerAttempt');
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
$this->bruteForceMiddleware->afterController($controller, 'testMethod' ,$response);
}
->expects($this->never())
->method('sleepDelay');
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
- /** @var Response|\PHPUnit_Framework_MockObject_MockObject $response */
+ /** @var Response|\PHPUnit\Framework\MockObject\MockObject $response */
$response = $this->createMock(Response::class);
$this->bruteForceMiddleware->afterController($controller, 'testMethod' ,$response);
}
/** @var ControllerMethodReflector */
private $reflector;
- /** @var Session|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Session|\PHPUnit\Framework\MockObject\MockObject */
private $session;
/** @var Throttler */
private $throttler;
$this->assertEquals($expected, $response);
}
-
+
public function testAfterExceptionWithRegularException() {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('A regular exception');
class PasswordConfirmationMiddlewareTest extends TestCase {
/** @var ControllerMethodReflector */
private $reflector;
- /** @var ISession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISession|\PHPUnit\Framework\MockObject\MockObject */
private $session;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
private $userSession;
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject */
private $user;
/** @var PasswordConfirmationMiddleware */
private $middleware;
/** @var Controller */
private $contoller;
- /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
private $timeFactory;
protected function setUp(): void {
use Test\TestCase;
class RateLimitingMiddlewareTest extends TestCase {
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
private $userSession;
- /** @var ControllerMethodReflector|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ControllerMethodReflector|\PHPUnit\Framework\MockObject\MockObject */
private $reflector;
- /** @var Limiter|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Limiter|\PHPUnit\Framework\MockObject\MockObject */
private $limiter;
/** @var RateLimitingMiddleware */
private $rateLimitingMiddleware;
->expects($this->never())
->method('registerAnonRequest');
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
$this->rateLimitingMiddleware->beforeController($controller, 'testMethod');
}
public function testBeforeControllerForAnon() {
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
$this->request
->expects($this->once())
}
public function testBeforeControllerForLoggedIn() {
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$this->userSession
}
public function testBeforeControllerAnonWithFallback() {
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
$this->request
->expects($this->once())
$this->rateLimitingMiddleware->beforeController($controller, 'testMethod');
}
-
+
public function testAfterExceptionWithOtherException() {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('My test exception');
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
$this->rateLimitingMiddleware->afterException($controller, 'testMethod', new \Exception('My test exception'));
}
public function testAfterExceptionWithJsonBody() {
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
$this->request
->expects($this->once())
}
public function testAfterExceptionWithHtmlBody() {
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
$this->request
->expects($this->once())
/** @var SameSiteCookieMiddleware */
private $middleware;
- /** @var Request|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Request|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var ControllerMethodReflector|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ControllerMethodReflector|\PHPUnit\Framework\MockObject\MockObject */
private $reflector;
protected function setUp(): void {
class SecurityMiddlewareTest extends \Test\TestCase {
- /** @var SecurityMiddleware|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var SecurityMiddleware|\PHPUnit\Framework\MockObject\MockObject */
private $middleware;
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject */
private $controller;
/** @var SecurityException */
private $secException;
/** @var SecurityException */
private $secAjaxException;
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
/** @var ControllerMethodReflector */
private $reader;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
private $logger;
- /** @var INavigationManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var INavigationManager|\PHPUnit\Framework\MockObject\MockObject */
private $navigationManager;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
private $urlGenerator;
- /** @var IAppManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */
private $appManager;
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l10n;
protected function setUp(): void {
use OCP\ILogger;
use OCP\ISession;
use OCP\Session\Exceptions\SessionNotAvailableException;
-use PHPUnit_Framework_MockObject_MockObject;
use Test\TestCase;
class StoreTest extends TestCase {
- /** @var ISession|PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISession|\PHPUnit\Framework\MockObject\MockObject */
private $session;
- /** @var IProvider|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IProvider|\PHPUnit\Framework\MockObject\MockObject */
private $tokenProvider;
- /** @var ILogger|PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
private $logger;
/** @var Store */
$this->assertEquals($token, $dbToken);
}
-
+
public function testGetInvalidToken() {
$this->expectException(\OCP\AppFramework\Db\DoesNotExistException::class);
$this->assertEquals($token, $dbToken);
}
-
+
public function testGetTokenByIdNotFound() {
$this->expectException(\OCP\AppFramework\Db\DoesNotExistException::class);
$this->mapper->getTokenById(-1);
}
-
+
public function testGetInvalidTokenById() {
$this->expectException(\OCP\AppFramework\Db\DoesNotExistException::class);
}
public function testDeleteById() {
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$qb = $this->dbConnection->getQueryBuilder();
$qb->select('id')
class DefaultTokenProviderTest extends TestCase {
- /** @var DefaultTokenProvider|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var DefaultTokenProvider|\PHPUnit\Framework\MockObject\MockObject */
private $tokenProvider;
- /** @var DefaultTokenMapper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var DefaultTokenMapper|\PHPUnit\Framework\MockObject\MockObject */
private $mapper;
- /** @var ICrypto|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICrypto|\PHPUnit\Framework\MockObject\MockObject */
private $crypto;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
private $logger;
- /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
private $timeFactory;
/** @var int */
private $time;
$this->tokenProvider->updateTokenActivity($tk);
}
-
+
public function testGetTokenByUser() {
$this->mapper->expects($this->once())
->method('getTokenByUser')
$this->assertEquals('passme', $actual);
}
-
+
public function testGetPasswordPasswordLessToken() {
$this->expectException(\OC\Authentication\Exceptions\PasswordlessTokenException::class);
$this->tokenProvider->getPassword($tk, $token);
}
-
+
public function testGetPasswordDeletesInvalidToken() {
$this->expectException(\OC\Authentication\Exceptions\InvalidTokenException::class);
$this->assertEquals('encryptedpassword', $token->getPassword());
}
-
+
public function testSetPasswordInvalidToken() {
$this->expectException(\OC\Authentication\Exceptions\InvalidTokenException::class);
$this->assertEquals($token, $dbToken);
}
-
+
public function testGetInvalidToken() {
$this->expectException(\OCP\AppFramework\Db\DoesNotExistException::class);
$this->assertEquals($token, $dbToken);
}
-
+
public function testGetTokenByIdNotFound() {
$this->expectException(\OCP\AppFramework\Db\DoesNotExistException::class);
$this->mapper->getTokenById(-1);
}
-
+
public function testGetInvalidTokenById() {
$this->expectException(\OCP\AppFramework\Db\DoesNotExistException::class);
}
public function testDeleteById() {
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$qb = $this->dbConnection->getQueryBuilder();
$qb->select('id')
}
public function testDeleteByIdWrongUser() {
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$id = 33;
class PublicKeyTokenProviderTest extends TestCase {
- /** @var PublicKeyTokenProvider|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var PublicKeyTokenProvider|\PHPUnit\Framework\MockObject\MockObject */
private $tokenProvider;
- /** @var PublicKeyTokenMapper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var PublicKeyTokenMapper|\PHPUnit\Framework\MockObject\MockObject */
private $mapper;
/** @var ICrypto */
private $crypto;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
private $logger;
- /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
private $timeFactory;
/** @var int */
private $time;
$this->assertSame($password, $this->tokenProvider->getPassword($actual, $token));
}
-
+
public function testGetPasswordPasswordLessToken() {
$this->expectException(\OC\Authentication\Exceptions\PasswordlessTokenException::class);
$this->tokenProvider->getPassword($tk, $token);
}
-
+
public function testGetPasswordInvalidToken() {
$this->expectException(\OC\Authentication\Exceptions\InvalidTokenException::class);
$this->assertSame($newpass, $this->tokenProvider->getPassword($actual, 'token'));
}
-
+
public function testSetPasswordInvalidToken() {
$this->expectException(\OC\Authentication\Exceptions\InvalidTokenException::class);
use OC\Authentication\TwoFactorAuth\ProviderLoader;
use OCP\App\IAppManager;
use OCP\Authentication\TwoFactorAuth\IProvider;
-use PHPUnit_Framework_MockObject_MockObject;
use Test\TestCase;
class ProviderLoaderTest extends TestCase {
- /** @var IAppManager|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */
private $appManager;
- /** @var IUser|PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IUser|\PHPUnit\Framework\MockObject\MockObject */
private $user;
/** @var ProviderLoader */
$this->loader = new ProviderLoader($this->appManager);
}
-
+
public function testFailHardIfProviderCanNotBeLoaded() {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('Could not load two-factor auth provider \\OCA\\MyFaulty2faApp\\DoesNotExist');
* Class AvatarManagerTest
*/
class AvatarManagerTest extends \Test\TestCase {
- /** @var Manager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Manager|\PHPUnit\Framework\MockObject\MockObject */
private $userManager;
- /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */
private $appData;
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l10n;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
private $logger;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var AvatarManager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var AvatarManager | \PHPUnit\Framework\MockObject\MockObject */
private $avatarManager;
protected function setUp(): void {
);
}
-
+
public function testGetAvatarInvalidUser() {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('user does not exist');
use OCP\ILogger;
class UserAvatarTest extends \Test\TestCase {
- /** @var Folder | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var Folder | \PHPUnit\Framework\MockObject\MockObject */
private $folder;
/** @var \OC\Avatar\UserAvatar */
private $avatar;
- /** @var \OC\User\User | \PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var \OC\User\User | \PHPUnit\Framework\MockObject\MockObject $user */
private $user;
- /** @var \OCP\IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
protected function setUp(): void {
}
private function getUserAvatar($user) {
- /** @var \OCP\IL10N | \PHPUnit_Framework_MockObject_MockObject $l */
+ /** @var \OCP\IL10N | \PHPUnit\Framework\MockObject\MockObject $l */
$l = $this->createMock(IL10N::class);
$l->method('t')->willReturnArgument(0);
/** @var \OCP\IDBConnection */
protected $connection;
- /** @var \OCP\IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var \OCP\AppFramework\Utility\ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\AppFramework\Utility\ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
protected $timeFactory;
protected function setUp(): void {
* @dataProvider searchProvider
*/
public function testSearch($search1, $search2, $expected) {
- /** @var ICalendar | \PHPUnit_Framework_MockObject_MockObject $calendar1 */
+ /** @var ICalendar | \PHPUnit\Framework\MockObject\MockObject $calendar1 */
$calendar1 = $this->createMock(ICalendar::class);
$calendar1->method('getKey')->willReturn('simple:1');
$calendar1->expects($this->once())
->with('', [], [], null, null)
->willReturn($search1);
- /** @var ICalendar | PHPUnit_Framework_MockObject_MockObject $calendar2 */
+ /** @var ICalendar | \PHPUnit\Framework\MockObject\MockObject $calendar2 */
$calendar2 = $this->createMock(ICalendar::class);
$calendar2->method('getKey')->willReturn('simple:2');
$calendar2->expects($this->once())
* @dataProvider searchProvider
*/
public function testSearchOptions($search1, $search2, $expected) {
- /** @var ICalendar | \PHPUnit_Framework_MockObject_MockObject $calendar1 */
+ /** @var ICalendar | \PHPUnit\Framework\MockObject\MockObject $calendar1 */
$calendar1 = $this->createMock(ICalendar::class);
$calendar1->method('getKey')->willReturn('simple:1');
$calendar1->expects($this->once())
['timerange' => ['start' => null, 'end' => null]], 5, 20)
->willReturn($search1);
- /** @var ICalendar | PHPUnit_Framework_MockObject_MockObject $calendar2 */
+ /** @var ICalendar | \PHPUnit\Framework\MockObject\MockObject $calendar2 */
$calendar2 = $this->createMock(ICalendar::class);
$calendar2->method('getKey')->willReturn('simple:2');
$calendar2->expects($this->once())
}
public function testRegisterUnregister() {
- /** @var ICalendar | \PHPUnit_Framework_MockObject_MockObject $calendar1 */
+ /** @var ICalendar | \PHPUnit\Framework\MockObject\MockObject $calendar1 */
$calendar1 = $this->createMock(ICalendar::class);
$calendar1->method('getKey')->willReturn('key1');
- /** @var ICalendar | \PHPUnit_Framework_MockObject_MockObject $calendar2 */
+ /** @var ICalendar | \PHPUnit\Framework\MockObject\MockObject $calendar2 */
$calendar2 = $this->createMock(ICalendar::class);
$calendar2->method('getKey')->willReturn('key2');
}
public function testGetCalendars() {
- /** @var ICalendar | \PHPUnit_Framework_MockObject_MockObject $calendar1 */
+ /** @var ICalendar | \PHPUnit\Framework\MockObject\MockObject $calendar1 */
$calendar1 = $this->createMock(ICalendar::class);
$calendar1->method('getKey')->willReturn('key1');
- /** @var ICalendar | \PHPUnit_Framework_MockObject_MockObject $calendar2 */
+ /** @var ICalendar | \PHPUnit\Framework\MockObject\MockObject $calendar2 */
$calendar2 = $this->createMock(ICalendar::class);
$calendar2->method('getKey')->willReturn('key2');
}
public function testIfEnabledIfSo() {
- /** @var ICalendar | \PHPUnit_Framework_MockObject_MockObject $calendar */
+ /** @var ICalendar | \PHPUnit\Framework\MockObject\MockObject $calendar */
$calendar = $this->createMock(ICalendar::class);
$this->manager->registerCalendar($calendar);
use Test\TestCase;
class GroupPluginTest extends TestCase {
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */
protected $groupManager;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
protected $session;
/** @var ISearchResult */
/** @var int */
protected $offset = 0;
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject */
protected $user;
protected function setUp(): void {
* @param string $gid
* @param null $displayName
* @param bool $hide
- * @return IGroup|\PHPUnit_Framework_MockObject_MockObject
+ * @return IGroup|\PHPUnit\Framework\MockObject\MockObject
*/
protected function getGroupMock($gid, $displayName = null, $hide = false) {
$group = $this->createMock(IGroup::class);
class LookupPluginTest extends TestCase {
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var IClientService|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IClientService|\PHPUnit\Framework\MockObject\MockObject */
protected $clientService;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
protected $userSession;
- /** @var ICloudIdManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICloudIdManager|\PHPUnit\Framework\MockObject\MockObject */
protected $cloudIdManager;
/** @var LookupPlugin */
protected $plugin;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
protected $logger;
protected function setUp(): void {
$this->clientService->expects($this->never())
->method('newClient');
- /** @var ISearchResult|\PHPUnit_Framework_MockObject_MockObject $searchResult */
+ /** @var ISearchResult|\PHPUnit\Framework\MockObject\MockObject $searchResult */
$searchResult = $this->createMock(ISearchResult::class);
$this->plugin->search('foobar', 10, 0, $searchResult);
$this->clientService->expects($this->never())
->method('newClient');
- /** @var ISearchResult|\PHPUnit_Framework_MockObject_MockObject $searchResult */
+ /** @var ISearchResult|\PHPUnit\Framework\MockObject\MockObject $searchResult */
$searchResult = $this->createMock(ISearchResult::class);
$this->plugin->search('foobar', 10, 0, $searchResult);
public function testSearch(array $searchParams) {
$type = new SearchResultType('lookup');
- /** @var ISearchResult|\PHPUnit_Framework_MockObject_MockObject $searchResult */
+ /** @var ISearchResult|\PHPUnit\Framework\MockObject\MockObject $searchResult */
$searchResult = $this->createMock(ISearchResult::class);
$searchResult->expects($this->once())
->method('addResultSet')
public function testSearchEnableDisableLookupServer(array $searchParams, $GSEnabled, $LookupEnabled) {
$type = new SearchResultType('lookup');
- /** @var ISearchResult|\PHPUnit_Framework_MockObject_MockObject $searchResult */
+ /** @var ISearchResult|\PHPUnit\Framework\MockObject\MockObject $searchResult */
$searchResult = $this->createMock(ISearchResult::class);
$this->config->expects($this->once())
->with('files_sharing', 'lookupServerEnabled', 'yes')
->willReturn('no');
- /** @var ISearchResult|\PHPUnit_Framework_MockObject_MockObject $searchResult */
+ /** @var ISearchResult|\PHPUnit\Framework\MockObject\MockObject $searchResult */
$searchResult = $this->createMock(ISearchResult::class);
$searchResult->expects($this->never())
->method('addResultSet');
use Test\TestCase;
class MailPluginTest extends TestCase {
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
protected $contactsManager;
- /** @var ICloudIdManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICloudIdManager|\PHPUnit\Framework\MockObject\MockObject */
protected $cloudIdManager;
/** @var MailPlugin */
/** @var SearchResult */
protected $searchResult;
- /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */
protected $groupManager;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
protected $userSession;
protected function setUp(): void {
$this->instantiatePlugin();
- /** @var \OCP\IUser | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IUser | \PHPUnit\Framework\MockObject\MockObject */
$currentUser = $this->createMock('\OCP\IUser');
$currentUser->expects($this->any())
class RemotePluginTest extends TestCase {
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
protected $contactsManager;
- /** @var ICloudIdManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICloudIdManager|\PHPUnit\Framework\MockObject\MockObject */
protected $cloudIdManager;
/** @var RemotePlugin */
use Test\TestCase;
class SearchResultTest extends TestCase {
- /** @var IContainer|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IContainer|\PHPUnit\Framework\MockObject\MockObject */
protected $container;
/** @var ISearch */
protected $search;
use Test\TestCase;
class SearchTest extends TestCase {
- /** @var IContainer|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IContainer|\PHPUnit\Framework\MockObject\MockObject */
protected $container;
/** @var ISearch */
protected $search;
use Test\TestCase;
class UserPluginTest extends TestCase {
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
- /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */
protected $groupManager;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
protected $session;
/** @var UserPlugin */
/** @var int */
protected $offset = 0;
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject */
protected $user;
protected function setUp(): void {
use Test\TestCase;
class SignAppTest extends TestCase {
- /** @var Checker|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Checker|\PHPUnit\Framework\MockObject\MockObject */
private $checker;
/** @var SignApp */
private $signApp;
- /** @var FileAccessHelper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var FileAccessHelper|\PHPUnit\Framework\MockObject\MockObject */
private $fileAccessHelper;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
private $urlGenerator;
protected function setUp(): void {
use Test\TestCase;
class SignCoreTest extends TestCase {
- /** @var Checker|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Checker|\PHPUnit\Framework\MockObject\MockObject */
private $checker;
- /** @var FileAccessHelper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var FileAccessHelper|\PHPUnit\Framework\MockObject\MockObject */
private $fileAccessHelper;
/** @var SignCore */
private $signCore;
return $factory->getManager();
}
-
+
public function testGetCommentNotFound() {
$this->expectException(\OCP\Comments\NotFoundException::class);
$manager->get('22');
}
-
+
public function testGetCommentNotFoundInvalidInput() {
$this->expectException(\InvalidArgumentException::class);
$this->assertEquals($comment->getLatestChildDateTime(), $latestChildDT);
}
-
+
public function testGetTreeNotFound() {
$this->expectException(\OCP\Comments\NotFoundException::class);
$manager->getTree('22');
}
-
+
public function testGetTreeNotFoundInvalidIpnut() {
$this->expectException(\InvalidArgumentException::class);
$this->addDatabaseEntry(0, 0, null, null, $fileIds[$i]);
}
$this->addDatabaseEntry(0, 0, (new \DateTime())->modify('-2 days'), null, $fileIds[0]);
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$user->expects($this->any())
->method('getUID')
$this->assertSame($comment->getObjectId(), $objectId);
}
-
+
public function testDelete() {
$this->expectException(\OCP\Comments\NotFoundException::class);
$this->assertSame($comment->getMessage(), $loadedComment->getMessage());
}
-
+
public function testSaveUpdateException() {
$this->expectException(\OCP\Comments\NotFoundException::class);
$manager->save($comment);
}
-
+
public function testSaveIncomplete() {
$this->expectException(\UnexpectedValueException::class);
}
public function testSetMarkRead() {
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$user->expects($this->any())
->method('getUID')
}
public function testSetMarkReadUpdate() {
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$user->expects($this->any())
->method('getUID')
}
public function testReadMarkDeleteUser() {
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$user->expects($this->any())
->method('getUID')
}
public function testReadMarkDeleteObject() {
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$user->expects($this->any())
->method('getUID')
$this->assertSame('SOMBRERO', $manager->resolveDisplayName('galaxy', 'sombrero'));
}
-
+
public function testRegisterResolverDuplicate() {
$this->expectException(\OutOfBoundsException::class);
$manager->registerDisplayNameResolver('planet', $planetClosure);
}
-
+
public function testRegisterResolverInvalidType() {
$this->expectException(\InvalidArgumentException::class);
$manager->registerDisplayNameResolver(1337, $planetClosure);
}
-
+
public function testResolveDisplayNameUnregisteredType() {
$this->expectException(\OutOfBoundsException::class);
$this->assertTrue(is_string($manager->resolveDisplayName('planet', 'neptune')));
}
-
+
public function testResolveDisplayNameInvalidType() {
$this->expectException(\InvalidArgumentException::class);
use OCP\ILogger;
use OCP\IServerContainer;
use OCP\IUser;
-use PHPUnit_Framework_MockObject_MockObject;
use Test\TestCase;
class ActionProviderStoreTest extends TestCase {
- /** @var IServerContainer|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IServerContainer|\PHPUnit\Framework\MockObject\MockObject */
private $serverContainer;
- /** @var IAppManager|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */
private $appManager;
- /** @var ILogger|PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
private $logger;
/** @var ActionProviderStore */
$this->assertInstanceOf(EMailProvider::class, $providers[0]);
}
-
+
public function testGetProvidersWithQueryException() {
$this->expectException(\Exception::class);
use OCP\IGroupManager;
use OCP\IUser;
use OCP\IUserManager;
-use PHPUnit_Framework_MockObject_MockObject;
use Test\TestCase;
class ContactsStoreTest extends TestCase {
/** @var ContactsStore */
private $contactsStore;
- /** @var IManager|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
private $contactsManager;
- /** @var IUserManager|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
private $userManager;
- /** @var IGroupManager|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */
private $groupManager;
- /** @var IConfig|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
protected function setUp(): void {
}
public function testGetContactsWithoutFilter() {
- /** @var IUser|PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$this->contactsManager->expects($this->once())
->method('search')
}
public function testGetContactsHidesOwnEntry() {
- /** @var IUser|PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$this->contactsManager->expects($this->once())
->method('search')
}
public function testGetContactsWithoutBinaryImage() {
- /** @var IUser|PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$this->contactsManager->expects($this->once())
->method('search')
}
public function testGetContactsWithoutAvatarURI() {
- /** @var IUser|PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$this->contactsManager->expects($this->once())
->method('search')
->with($this->equalTo('core'), $this->equalTo('shareapi_exclude_groups_list'), $this->equalTo(''))
->willReturn('["group1", "group5", "group6"]');
- /** @var IUser|PHPUnit_Framework_MockObject_MockObject $currentUser */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $currentUser */
$currentUser = $this->createMock(IUser::class);
$currentUser->expects($this->once())
->method('getUID')
->with($this->equalTo('core'), $this->equalTo('shareapi_only_share_with_group_members'), $this->equalTo('no'))
->willReturn('yes');
- /** @var IUser|PHPUnit_Framework_MockObject_MockObject $currentUser */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $currentUser */
$currentUser = $this->createMock(IUser::class);
$currentUser->expects($this->once())
->method('getUID')
->with($this->equalTo('core'), $this->equalTo('shareapi_only_share_with_group_members'), $this->equalTo('no'))
->willReturn('no');
- /** @var IUser|PHPUnit_Framework_MockObject_MockObject $currentUser */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $currentUser */
$currentUser = $this->createMock(IUser::class);
$currentUser->expects($this->once())
->method('getUID')
->with($this->equalTo('core'), $this->equalTo('shareapi_allow_share_dialog_user_enumeration'), $this->equalTo('yes'))
->willReturn('no');
- /** @var IUser|PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$this->contactsManager->expects($this->any())
->method('search')
->with($this->equalTo('core'), $this->equalTo('shareapi_allow_share_dialog_user_enumeration'), $this->equalTo('yes'))
->willReturn('yes');
- /** @var IUser|PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$this->contactsManager->expects($this->once())
->method('search')
}
public function testFindOneEMail() {
- /** @var IUser|PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$this->contactsManager->expects($this->once())
->method('search')
}
public function testFindOneNotSupportedType() {
- /** @var IUser|PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$entry = $this->contactsStore->findOne($user, 42, 'darren@roner.au');
}
public function testFindOneNoMatches() {
- /** @var IUser|PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$this->contactsManager->expects($this->once())
->method('search')
use OCP\Contacts\ContactsMenu\IProvider;
use OCP\IConfig;
use OCP\IUser;
-use PHPUnit_Framework_MockObject_MockObject;
use Test\TestCase;
class ManagerTest extends TestCase {
- /** @var ContactsStore|PHPUnit_Framework_MockObject_MockObject */
+ /** @var ContactsStore|\PHPUnit\Framework\MockObject\MockObject */
private $contactsStore;
- /** @var IAppManager|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */
private $appManager;
- /** @var IConfig|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var ActionProviderStore|PHPUnit_Framework_MockObject_MockObject */
+ /** @var ActionProviderStore|\PHPUnit\Framework\MockObject\MockObject */
private $actionProviderStore;
/** @var Manager */
use OCP\Contacts\ContactsMenu\IEntry;
use OCP\Contacts\ContactsMenu\ILinkAction;
use OCP\IURLGenerator;
-use PHPUnit_Framework_MockObject_MockObject;
use Test\TestCase;
class EMailproviderTest extends TestCase {
- /** @var IActionFactory|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IActionFactory|\PHPUnit\Framework\MockObject\MockObject */
private $actionFactory;
- /** @var IURLGenerator|PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
private $urlGenerator;
/** @var EMailProvider */
* @dataProvider searchProvider
*/
public function testSearch($search1, $search2, $expectedResult) {
- /** @var \PHPUnit_Framework_MockObject_MockObject|IAddressBook $addressbook */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IAddressBook $addressbook */
$addressbook1 = $this->getMockBuilder('\OCP\IAddressBook')
->disableOriginalConstructor()
->getMock();
$result = $this->cm->search('');
$this->assertEquals($expectedResult, $result);
}
-
+
public function testDeleteHavePermission() {
- /** @var \PHPUnit_Framework_MockObject_MockObject|IAddressBook $addressbook */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IAddressBook $addressbook */
$addressbook = $this->getMockBuilder('\OCP\IAddressBook')
->disableOriginalConstructor()
->getMock();
}
public function testDeleteNoPermission() {
- /** @var \PHPUnit_Framework_MockObject_MockObject|IAddressBook $addressbook */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IAddressBook $addressbook */
$addressbook = $this->getMockBuilder('\OCP\IAddressBook')
->disableOriginalConstructor()
->getMock();
}
public function testDeleteNoAddressbook() {
- /** @var \PHPUnit_Framework_MockObject_MockObject|IAddressBook $addressbook */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IAddressBook $addressbook */
$addressbook = $this->getMockBuilder('\OCP\IAddressBook')
->disableOriginalConstructor()
->getMock();
}
public function testCreateOrUpdateHavePermission() {
- /** @var \PHPUnit_Framework_MockObject_MockObject|IAddressBook $addressbook */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IAddressBook $addressbook */
$addressbook = $this->getMockBuilder('\OCP\IAddressBook')
->disableOriginalConstructor()
->getMock();
}
public function testCreateOrUpdateNoPermission() {
- /** @var \PHPUnit_Framework_MockObject_MockObject|IAddressBook $addressbook */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IAddressBook $addressbook */
$addressbook = $this->getMockBuilder('\OCP\IAddressBook')
->disableOriginalConstructor()
->getMock();
}
public function testCreateOrUpdateNOAdressbook() {
- /** @var \PHPUnit_Framework_MockObject_MockObject|IAddressBook $addressbook */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IAddressBook $addressbook */
$addressbook = $this->getMockBuilder('\OCP\IAddressBook')
->disableOriginalConstructor()
->getMock();
}
public function testIsEnabledIfSo() {
- /** @var \PHPUnit_Framework_MockObject_MockObject|IAddressBook $addressbook */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IAddressBook $addressbook */
$addressbook = $this->getMockBuilder('\OCP\IAddressBook')
->disableOriginalConstructor()
->getMock();
public function testAddressBookEnumeration() {
// create mock for the addressbook
- /** @var \PHPUnit_Framework_MockObject_MockObject|IAddressBook $addressbook */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IAddressBook $addressbook */
$addressbook = $this->getMockBuilder('\OCP\IAddressBook')
->disableOriginalConstructor()
->getMock();
* @return IConfig
*/
protected function getConfig() {
- /** @var IConfig | \PHPUnit_Framework_MockObject_MockObject $config */
+ /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject $config */
$config = $this->getMockBuilder(IConfig::class)
->disableOriginalConstructor()
->getMock();
*/
class MigrationsTest extends \Test\TestCase {
- /** @var MigrationService | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var MigrationService | \PHPUnit\Framework\MockObject\MockObject */
private $migrationService;
- /** @var \PHPUnit_Framework_MockObject_MockObject | IDBConnection $db */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | IDBConnection $db */
private $db;
protected function setUp(): void {
/** @var IDBConnection */
protected $connection;
- /** @var SystemConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var SystemConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
protected $logger;
protected function setUp(): void {
*/
class DecryptAllTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject | IUserManager */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | IUserManager */
protected $userManager;
- /** @var \PHPUnit_Framework_MockObject_MockObject | Manager */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | Manager */
protected $encryptionManager;
- /** @var \PHPUnit_Framework_MockObject_MockObject | View */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | View */
protected $view;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \Symfony\Component\Console\Input\InputInterface */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Input\InputInterface */
protected $inputInterface;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \Symfony\Component\Console\Output\OutputInterface */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Output\OutputInterface */
protected $outputInterface;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\UserInterface */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\UserInterface */
protected $userInterface;
/** @var DecryptAll */
} else {
$this->userManager->expects($this->never())->method('userExists');
}
- /** @var DecryptAll | \PHPUnit_Framework_MockObject_MockObject | $instance */
+ /** @var DecryptAll | \PHPUnit\Framework\MockObject\MockObject | $instance */
$instance = $this->getMockBuilder('OC\Encryption\DecryptAll')
->setConstructorArgs(
[
*/
public function testDecryptAllUsersFiles($user) {
- /** @var DecryptAll | \PHPUnit_Framework_MockObject_MockObject | $instance */
+ /** @var DecryptAll | \PHPUnit\Framework\MockObject\MockObject | $instance */
$instance = $this->getMockBuilder('OC\Encryption\DecryptAll')
->setConstructorArgs(
[
}
public function testDecryptUsersFiles() {
- /** @var DecryptAll | \PHPUnit_Framework_MockObject_MockObject $instance */
+ /** @var DecryptAll | \PHPUnit\Framework\MockObject\MockObject $instance */
$instance = $this->getMockBuilder('OC\Encryption\DecryptAll')
->setConstructorArgs(
[
public function testDecryptFile($isEncrypted) {
$path = 'test.txt';
- /** @var DecryptAll | \PHPUnit_Framework_MockObject_MockObject $instance */
+ /** @var DecryptAll | \PHPUnit\Framework\MockObject\MockObject $instance */
$instance = $this->getMockBuilder('OC\Encryption\DecryptAll')
->setConstructorArgs(
[
public function testDecryptFileFailure() {
$path = 'test.txt';
- /** @var DecryptAll | \PHPUnit_Framework_MockObject_MockObject $instance */
+ /** @var DecryptAll | \PHPUnit\Framework\MockObject\MockObject $instance */
$instance = $this->getMockBuilder('OC\Encryption\DecryptAll')
->setConstructorArgs(
[
/** @var EncryptionWrapper */
private $instance;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\ILogger */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\ILogger */
private $logger;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OC\Encryption\Manager */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OC\Encryption\Manager */
private $manager;
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OC\Memcache\ArrayCache */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | \OC\Memcache\ArrayCache */
private $arrayCache;
protected function setUp(): void {
/** @var Storage */
protected $storage;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $util;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $view;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $config;
protected function setUp(): void {
/** @var Manager */
private $manager;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
private $logger;
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l10n;
- /** @var View|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var View|\PHPUnit\Framework\MockObject\MockObject */
private $view;
- /** @var Util|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Util|\PHPUnit\Framework\MockObject\MockObject */
private $util;
-
- /** @var ArrayCache|\PHPUnit_Framework_MockObject_MockObject */
+
+ /** @var ArrayCache|\PHPUnit\Framework\MockObject\MockObject */
private $arrayCache;
protected function setUp(): void {
$this->assertEmpty($this->manager->getEncryptionModules());
}
-
+
public function testGetEncryptionModuleUnknown() {
$this->expectException(\OC\Encryption\Exceptions\ModuleDoesNotExistsException::class);
$this->expectExceptionMessage('Module with ID: unknown does not exist.');
/** @var string */
private $uid;
- /** @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject */
private $view;
- /** @var \OC\Encryption\Util | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC\Encryption\Util | \PHPUnit\Framework\MockObject\MockObject */
private $util;
- /** @var \OC\Files\Mount\Manager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC\Files\Mount\Manager | \PHPUnit\Framework\MockObject\MockObject */
private $mountManager;
- /** @var \OC\Encryption\Manager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC\Encryption\Manager | \PHPUnit\Framework\MockObject\MockObject */
private $encryptionManager;
- /** @var \OCP\Encryption\IEncryptionModule | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\Encryption\IEncryptionModule | \PHPUnit\Framework\MockObject\MockObject */
private $encryptionModule;
- /** @var \OC\Encryption\File | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC\Encryption\File | \PHPUnit\Framework\MockObject\MockObject */
private $fileHelper;
protected function setUp(): void {
* create mock of the update method
*
* @param array$methods methods which should be set
- * @return \OC\Encryption\Update | \PHPUnit_Framework_MockObject_MockObject
+ * @return \OC\Encryption\Update | \PHPUnit\Framework\MockObject\MockObject
*/
protected function getUpdateMock($methods) {
return $this->getMockBuilder('\OC\Encryption\Update')
*/
protected $headerSize = 8192;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $view;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $groupManager;
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
private $config;
/** @var \OC\Encryption\Util */
];
}
-
+
public function testCreateHeaderFailed() {
$this->expectException(\OC\Encryption\Exceptions\EncryptionHeaderKeyExistsException::class);
use OCP\Files\SimpleFS\ISimpleFolder;
class AppDataTest extends \Test\TestCase {
- /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */
private $rootFolder;
- /** @var SystemConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var SystemConfig|\PHPUnit\Framework\MockObject\MockObject */
private $systemConfig;
/** @var IAppData */
use OCP\Files\IRootFolder;
class FactoryTest extends \Test\TestCase {
- /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */
private $rootFolder;
- /** @var SystemConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var SystemConfig|\PHPUnit\Framework\MockObject\MockObject */
private $systemConfig;
/** @var Factory */
$folderWith0308 = "\x53\x63\x68\x6f\xcc\x88\x6e";
/**
- * @var \OC\Files\Cache\Cache | \PHPUnit_Framework_MockObject_MockObject $cacheMock
+ * @var \OC\Files\Cache\Cache | \PHPUnit\Framework\MockObject\MockObject $cacheMock
*/
$cacheMock = $this->getMockBuilder(Cache::class)
->setMethods(['normalize'])
/** @var IQueryBuilder */
private $builder;
- /** @var IMimeTypeLoader|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IMimeTypeLoader|\PHPUnit\Framework\MockObject\MockObject */
private $mimetypeLoader;
/** @var QuerySearchHelper */
/** @var ObjectHomeMountProvider */
protected $provider;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject */
protected $user;
- /** @var IStorageFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IStorageFactory|\PHPUnit\Framework\MockObject\MockObject */
protected $loader;
protected function setUp(): void {
$this->user->method('getUID')
->willReturn('uid');
$this->loader->expects($this->never())->method($this->anything());
-
+
$mount = $this->provider->getHomeMountForUser($this->user, $this->loader);
$this->assertInstanceOf('OC\Files\Mount\MountPoint', $mount);
}
}
public function testGetContent() {
- /** @var \OC\Files\Node\Root|\PHPUnit_Framework_MockObject_MockObject $root */
+ /** @var \OC\Files\Node\Root|\PHPUnit\Framework\MockObject\MockObject $root */
$root = $this->getMockBuilder('\OC\Files\Node\Root')
->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager])
->getMock();
$this->assertEquals('bar', $node->getContent());
}
-
+
public function testGetContentNotPermitted() {
$this->expectException(\OCP\Files\NotPermittedException::class);
- /** @var \OC\Files\Node\Root|\PHPUnit_Framework_MockObject_MockObject $root */
+ /** @var \OC\Files\Node\Root|\PHPUnit\Framework\MockObject\MockObject $root */
$root = $this->getMockBuilder('\OC\Files\Node\Root')
->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager])
->getMock();
}
public function testPutContent() {
- /** @var \OC\Files\Node\Root|\PHPUnit_Framework_MockObject_MockObject $root */
+ /** @var \OC\Files\Node\Root|\PHPUnit\Framework\MockObject\MockObject $root */
$root = $this->getMockBuilder('\OC\Files\Node\Root')
->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager])
->getMock();
$node->putContent('bar');
}
-
+
public function testPutContentNotPermitted() {
$this->expectException(\OCP\Files\NotPermittedException::class);
- /** @var \OC\Files\Node\Root|\PHPUnit_Framework_MockObject_MockObject $root */
+ /** @var \OC\Files\Node\Root|\PHPUnit\Framework\MockObject\MockObject $root */
$root = $this->getMockBuilder('\OC\Files\Node\Root')
->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager])
->getMock();
}
public function testGetMimeType() {
- /** @var \OC\Files\Node\Root|\PHPUnit_Framework_MockObject_MockObject $root */
+ /** @var \OC\Files\Node\Root|\PHPUnit\Framework\MockObject\MockObject $root */
$root = $this->getMockBuilder('\OC\Files\Node\Root')
->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager])
->getMock();
$this->assertEquals(2, $hooksCalled);
}
-
+
public function testFOpenReadNotPermitted() {
$this->expectException(\OCP\Files\NotPermittedException::class);
$node->fopen('r');
}
-
+
public function testFOpenReadWriteNoReadPermissions() {
$this->expectException(\OCP\Files\NotPermittedException::class);
$node->fopen('w');
}
-
+
public function testFOpenReadWriteNoWritePermissions() {
$this->expectException(\OCP\Files\NotPermittedException::class);
public function testGetDirectoryContent() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
public function testGet() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
public function testNodeExists() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
public function testNodeExistsNotExists() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
public function testNewFolder() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
$this->assertEquals($child, $result);
}
-
+
public function testNewFolderNotPermitted() {
$this->expectException(\OCP\Files\NotPermittedException::class);
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
public function testNewFile() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
$this->assertEquals($child, $result);
}
-
+
public function testNewFileNotPermitted() {
$this->expectException(\OCP\Files\NotPermittedException::class);
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
public function testGetFreeSpace() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
public function testSearch() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
public function testSearchInRoot() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
$root->expects($this->any())
->method('getUser')
->willReturn($this->user);
- /** @var \PHPUnit_Framework_MockObject_MockObject|Storage $storage */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|Storage $storage */
$storage = $this->createMock(Storage::class);
$storage->method('getId')->willReturn('');
$cache = $this->getMockBuilder(Cache::class)->setConstructorArgs([$storage])->getMock();
public function testSearchInStorageRoot() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
public function testSearchSubStorages() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
public function testGetById() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
public function testGetByIdMountRoot() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
public function testGetByIdOutsideFolder() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
public function testGetByIdMultipleStorages() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
$manager = $this->createMock(Manager::class);
$folderPath = '/bar/foo';
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
$manager = $this->createMock(Manager::class);
$folderPath = '/bar/foo';
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
- /** @var \PHPUnit_Framework_MockObject_MockObject|\OC\Files\Node\Root $root */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Files\Node\Root $root */
$root = $this->getMockBuilder(Root::class)
->setMethods(['getUser', 'getMountsIn', 'getMount'])
->setConstructorArgs([$manager, $view, $this->user, $this->userMountCache, $this->logger, $this->userManager])
->getMock();
- /** @var \PHPUnit_Framework_MockObject_MockObject|\OC\Files\FileInfo $folderInfo */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Files\FileInfo $folderInfo */
$folderInfo = $this->getMockBuilder(FileInfo::class)
->disableOriginalConstructor()->getMock();
$manager = $this->createMock(Manager::class);
$folderPath = '/bar/foo';
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
- /** @var \PHPUnit_Framework_MockObject_MockObject|\OC\Files\Node\Root $root */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Files\Node\Root $root */
$root = $this->getMockBuilder(Root::class)
->setMethods(['getUser', 'getMountsIn', 'getMount'])
->setConstructorArgs([$manager, $view, $this->user, $this->userMountCache, $this->logger, $this->userManager])
->getMock();
- /** @var \PHPUnit_Framework_MockObject_MockObject|\OC\Files\FileInfo $folderInfo */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Files\FileInfo $folderInfo */
$folderInfo = $this->getMockBuilder(FileInfo::class)
->disableOriginalConstructor()->getMock();
$manager = $this->createMock(Manager::class);
$folderPath = '/bar/foo';
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
- /** @var \PHPUnit_Framework_MockObject_MockObject|\OC\Files\Node\Root $root */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Files\Node\Root $root */
$root = $this->getMockBuilder(Root::class)
->setMethods(['getUser', 'getMountsIn', 'getMount'])
->setConstructorArgs([$manager, $view, $this->user, $this->userMountCache, $this->logger, $this->userManager])
->getMock();
- /** @var \PHPUnit_Framework_MockObject_MockObject|\OC\Files\FileInfo $folderInfo */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Files\FileInfo $folderInfo */
$folderInfo = $this->getMockBuilder(FileInfo::class)
->disableOriginalConstructor()->getMock();
protected $user;
/** @var \OC\Files\Mount\Manager */
protected $manager;
- /** @var \OC\Files\View|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC\Files\View|\PHPUnit\Framework\MockObject\MockObject */
protected $view;
- /** @var \OC\Files\Node\Root|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC\Files\Node\Root|\PHPUnit\Framework\MockObject\MockObject */
protected $root;
- /** @var \OCP\Files\Config\IUserMountCache|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\Files\Config\IUserMountCache|\PHPUnit\Framework\MockObject\MockObject */
protected $userMountCache;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
protected $logger;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
protected function setUp(): void {
$this->assertEquals(2, $hooksRun);
}
-
+
public function testDeleteNotPermitted() {
$this->expectException(\OCP\Files\NotPermittedException::class);
->method('getUser')
->willReturn($this->user);
/**
- * @var \OC\Files\Storage\Storage | \PHPUnit_Framework_MockObject_MockObject $storage
+ * @var \OC\Files\Storage\Storage | \PHPUnit\Framework\MockObject\MockObject $storage
*/
$storage = $this->getMockBuilder('\OC\Files\Storage\Storage')
->disableOriginalConstructor()
->method('getUser')
->willReturn($this->user);
/**
- * @var \OC\Files\Storage\Storage | \PHPUnit_Framework_MockObject_MockObject $storage
+ * @var \OC\Files\Storage\Storage | \PHPUnit\Framework\MockObject\MockObject $storage
*/
$storage = $this->getMockBuilder('\OC\Files\Storage\Storage')
->disableOriginalConstructor()
$this->assertEquals(2, $hooksRun);
}
-
+
public function testTouchNotPermitted() {
$this->expectException(\OCP\Files\NotPermittedException::class);
$node->touch(100);
}
-
+
public function testInvalidPath() {
$this->expectException(\OCP\Files\InvalidPathException::class);
$this->assertEquals(3, $target->getId());
}
-
+
public function testCopyNotPermitted() {
$this->expectException(\OCP\Files\NotPermittedException::class);
/**
- * @var \OC\Files\Storage\Storage | \PHPUnit_Framework_MockObject_MockObject $storage
+ * @var \OC\Files\Storage\Storage | \PHPUnit\Framework\MockObject\MockObject $storage
*/
$storage = $this->createMock('\OC\Files\Storage\Storage');
$node->copy('/bar/asd');
}
-
+
public function testCopyNoParent() {
$this->expectException(\OCP\Files\NotFoundException::class);
$node->copy('/bar/asd/foo');
}
-
+
public function testCopyParentIsFile() {
$this->expectException(\OCP\Files\NotPermittedException::class);
* @param string $postHookName
*/
public function testMoveCopyHooks($operationMethod, $viewMethod, $preHookName, $postHookName) {
- /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject $root */
+ /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject $root */
$root = $this->getMockBuilder('\OC\Files\Node\Root')
->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager])
->setMethods(['get'])
->willReturn($this->getFileInfo(['permissions' => \OCP\Constants::PERMISSION_ALL, 'fileid' => 1]));
/**
- * @var \OC\Files\Node\File|\PHPUnit_Framework_MockObject_MockObject $node
+ * @var \OC\Files\Node\File|\PHPUnit\Framework\MockObject\MockObject $node
*/
$node = $this->createTestNode($root, $this->view, '/bar/foo');
$parentNode = new \OC\Files\Node\Folder($root, $this->view, '/bar');
$this->assertEquals(4, $hooksRun);
}
-
+
public function testMoveNotPermitted() {
$this->expectException(\OCP\Files\NotPermittedException::class);
$node->move('/bar/asd');
}
-
+
public function testMoveNoParent() {
$this->expectException(\OCP\Files\NotFoundException::class);
/**
- * @var \OC\Files\Storage\Storage | \PHPUnit_Framework_MockObject_MockObject $storage
+ * @var \OC\Files\Storage\Storage | \PHPUnit\Framework\MockObject\MockObject $storage
*/
$storage = $this->createMock('\OC\Files\Storage\Storage');
$node->move('/bar/asd');
}
-
+
public function testMoveParentIsFile() {
$this->expectException(\OCP\Files\NotPermittedException::class);
$node->move('/bar/asd');
}
-
+
public function testMoveFailed() {
$this->expectException(\OCP\Files\NotPermittedException::class);
$node->move('/bar/asd');
}
-
+
public function testCopyFailed() {
$this->expectException(\OCP\Files\NotPermittedException::class);
private $user;
/** @var \OC\Files\Mount\Manager */
private $manager;
- /** @var \OCP\Files\Config\IUserMountCache|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\Files\Config\IUserMountCache|\PHPUnit\Framework\MockObject\MockObject */
private $userMountCache;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
private $logger;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
private $userManager;
protected function setUp(): void {
->disableOriginalConstructor()
->getMock();
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->getMockBuilder(View::class)
->disableOriginalConstructor()
$this->assertInstanceOf('\OC\Files\Node\File', $node);
}
-
+
public function testGetNotFound() {
$this->expectException(\OCP\Files\NotFoundException::class);
->disableOriginalConstructor()
->getMock();
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->getMockBuilder(View::class)
->disableOriginalConstructor()
$root->get('/bar/foo');
}
-
+
public function testGetInvalidPath() {
$this->expectException(\OCP\Files\NotPermittedException::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->getMockBuilder(View::class)
->disableOriginalConstructor()
$root->get('/../foo');
}
-
+
public function testGetNoStorages() {
$this->expectException(\OCP\Files\NotFoundException::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->getMockBuilder(View::class)
->disableOriginalConstructor()
->method('get')
->with('MyUserId')
->willReturn($user);
- /** @var CappedMemoryCache|\PHPUnit_Framework_MockObject_MockObject $cappedMemoryCache */
+ /** @var CappedMemoryCache|\PHPUnit\Framework\MockObject\MockObject $cappedMemoryCache */
$cappedMemoryCache = $this->createMock(CappedMemoryCache::class);
$cappedMemoryCache
->expects($this->once())
$this->assertEquals($folder, $root->getUserFolder('MyUserId'));
}
-
+
public function testGetUserFolderWithNoUserObj() {
$this->expectException(\OC\User\NoUserException::class);
$this->expectExceptionMessage('Backends provided no user object');
use OCP\Files\NotFoundException;
class SimpleFileTest extends \Test\TestCase {
- /** @var File|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var File|\PHPUnit\Framework\MockObject\MockObject */
private $file;
/** @var SimpleFile */
private $sourceStorage;
/**
- * @var \OC\Files\Storage\Wrapper\Encryption | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OC\Files\Storage\Wrapper\Encryption | \PHPUnit\Framework\MockObject\MockObject
*/
protected $instance;
/**
- * @var \OC\Encryption\Keys\Storage | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OC\Encryption\Keys\Storage | \PHPUnit\Framework\MockObject\MockObject
*/
private $keyStore;
/**
- * @var \OC\Encryption\Util | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OC\Encryption\Util | \PHPUnit\Framework\MockObject\MockObject
*/
private $util;
/**
- * @var \OC\Encryption\Manager | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OC\Encryption\Manager | \PHPUnit\Framework\MockObject\MockObject
*/
private $encryptionManager;
/**
- * @var \OCP\Encryption\IEncryptionModule | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OCP\Encryption\IEncryptionModule | \PHPUnit\Framework\MockObject\MockObject
*/
private $encryptionModule;
/**
- * @var \OC\Encryption\Update | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OC\Encryption\Update | \PHPUnit\Framework\MockObject\MockObject
*/
private $update;
/**
- * @var \OC\Files\Cache\Cache | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OC\Files\Cache\Cache | \PHPUnit\Framework\MockObject\MockObject
*/
private $cache;
/**
- * @var \OC\Log | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OC\Log | \PHPUnit\Framework\MockObject\MockObject
*/
private $logger;
/**
- * @var \OC\Encryption\File | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OC\Encryption\File | \PHPUnit\Framework\MockObject\MockObject
*/
private $file;
/**
- * @var \OC\Files\Mount\MountPoint | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OC\Files\Mount\MountPoint | \PHPUnit\Framework\MockObject\MockObject
*/
private $mount;
/**
- * @var \OC\Files\Mount\Manager | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OC\Files\Mount\Manager | \PHPUnit\Framework\MockObject\MockObject
*/
private $mountManager;
/**
- * @var \OC\Group\Manager | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OC\Group\Manager | \PHPUnit\Framework\MockObject\MockObject
*/
private $groupManager;
/**
- * @var \OCP\IConfig | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OCP\IConfig | \PHPUnit\Framework\MockObject\MockObject
*/
private $config;
- /** @var \OC\Memcache\ArrayCache | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC\Memcache\ArrayCache | \PHPUnit\Framework\MockObject\MockObject */
private $arrayCache;
}
/**
- * @return \PHPUnit_Framework_MockObject_MockObject
+ * @return \PHPUnit\Framework\MockObject\MockObject
*/
protected function buildMockModule() {
$this->encryptionModule = $this->getMockBuilder('\OCP\Encryption\IEncryptionModule')
$mountPoint = '/mountPoint';
- /** @var \OC\Files\Storage\Wrapper\Encryption |\PHPUnit_Framework_MockObject_MockObject $instance */
+ /** @var \OC\Files\Storage\Wrapper\Encryption |\PHPUnit\Framework\MockObject\MockObject $instance */
$instance = $this->getMockBuilder('\OC\Files\Storage\Wrapper\Encryption')
->setConstructorArgs(
[
->getMock();
if ($encryptionModule === true) {
- /** @var IEncryptionModule|\PHPUnit_Framework_MockObject_MockObject $encryptionModule */
+ /** @var IEncryptionModule|\PHPUnit\Framework\MockObject\MockObject $encryptionModule */
$encryptionModule = $this->createMock(IEncryptionModule::class);
}
class EncryptionTest extends \Test\TestCase {
- /** @var \OCP\Encryption\IEncryptionModule | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\Encryption\IEncryptionModule | \PHPUnit\Framework\MockObject\MockObject */
private $encryptionModule;
/**
}
/**
- * @return \PHPUnit_Framework_MockObject_MockObject
+ * @return \PHPUnit\Framework\MockObject\MockObject
*/
protected function buildMockModule() {
$encryptionModule = $this->getMockBuilder('\OCP\Encryption\IEncryptionModule')
private function doTestCopyRenameFail($operation) {
$storage1 = new Temporary([]);
- /** @var \PHPUnit_Framework_MockObject_MockObject|Temporary $storage2 */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|Temporary $storage2 */
$storage2 = $this->getMockBuilder(TemporaryNoCross::class)
->setConstructorArgs([[]])
->setMethods(['fopen'])
}
public function testDeleteFailKeepCache() {
- /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */
+ /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */
$storage = $this->getMockBuilder(Temporary::class)
->setConstructorArgs([[]])
->setMethods(['unlink'])
->getMock();
}
- /** @var IMountProvider|\PHPUnit_Framework_MockObject_MockObject $mountProvider */
+ /** @var IMountProvider|\PHPUnit\Framework\MockObject\MockObject $mountProvider */
$mountProvider = $this->createMock(IMountProvider::class);
$mountProvider->expects($this->any())
->method('getMountsForUser')
) {
$view = new View('/' . $this->user . '/files/');
- /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */
+ /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */
$storage = $this->getMockBuilder(Temporary::class)
->setMethods([$operation])
->getMock();
$view = new View('/' . $this->user . '/files/');
$path = 'test_file_put_contents.txt';
- /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */
+ /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */
$storage = $this->getMockBuilder(Temporary::class)
->setMethods(['fopen'])
->getMock();
$view = new View('/' . $this->user . '/files/');
$path = 'test_file_put_contents.txt';
- /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */
+ /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */
$storage = $this->getMockBuilder(Temporary::class)
->setMethods(['fopen'])
->getMock();
}
$view = new View('/' . $this->user . '/files/');
- /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */
+ /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */
$storage = $this->getMockBuilder(Temporary::class)
->setMethods([$operation])
->getMock();
) {
$view = new View('/' . $this->user . '/files/');
- /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */
+ /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */
$storage = $this->getMockBuilder(Temporary::class)
->setMethods([$operation])
->getMock();
public function testLockFileRename($operation, $expectedLockTypeSourceDuring) {
$view = new View('/' . $this->user . '/files/');
- /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */
+ /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */
$storage = $this->getMockBuilder(Temporary::class)
->setMethods([$operation, 'getMetaData', 'filemtime'])
->getMock();
$view = new View('/' . $this->user . '/files/');
- /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */
+ /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */
$storage = $this->getMockBuilder(Temporary::class)
->setMethods(['copy'])
->getMock();
public function testLockFileRenameCrossStorage($viewOperation, $storageOperation, $expectedLockTypeSourceDuring) {
$view = new View('/' . $this->user . '/files/');
- /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */
+ /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */
$storage = $this->getMockBuilder(Temporary::class)
->setMethods([$storageOperation])
->getMock();
- /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage2 */
+ /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage2 */
$storage2 = $this->getMockBuilder(Temporary::class)
->setMethods([$storageOperation, 'getMetaData', 'filemtime'])
->getMock();
$mountPoint = '/' . $this->user . '/files/mount/';
// Mock the mount point
- /** @var TestMoveableMountPoint|\PHPUnit_Framework_MockObject_MockObject $mount */
+ /** @var TestMoveableMountPoint|\PHPUnit\Framework\MockObject\MockObject $mount */
$mount = $this->createMock(TestMoveableMountPoint::class);
$mount->expects($this->once())
->method('getMountPoint')
class ConfigTest extends TestCase {
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
protected function setUp(): void {
/**
* @param array $mockMethods
- * @return Config|\PHPUnit_Framework_MockObject_MockObject
+ * @return Config|\PHPUnit\Framework\MockObject\MockObject
*/
public function getInstance($mockMethods = []) {
if (!empty($mockMethods)) {
/**
* @param null|int $implementedActions
- * @return \PHPUnit_Framework_MockObject_MockObject
+ * @return \PHPUnit\Framework\MockObject\MockObject
*/
private function getTestBackend($implementedActions = null) {
if ($implementedActions === null) {
public function testGet() {
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend
*/
$backend = $this->getTestBackend();
$backend->expects($this->any())
public function testGetNotExists() {
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend
*/
$backend = $this->getTestBackend();
$backend->expects($this->once())
public function testGetMultipleBackends() {
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend1
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend1
*/
$backend1 = $this->getTestBackend();
$backend1->expects($this->any())
->willReturn(false);
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend2
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend2
*/
$backend2 = $this->getTestBackend();
$backend2->expects($this->any())
}
public function testCreate() {
- /**@var \PHPUnit_Framework_MockObject_MockObject|\OC\Group\Backend $backend */
+ /**@var \PHPUnit\Framework\MockObject\MockObject|\OC\Group\Backend $backend */
$backendGroupCreated = false;
$backend = $this->getTestBackend();
$backend->expects($this->any())
}
public function testCreateFailure() {
- /**@var \PHPUnit_Framework_MockObject_MockObject|\OC\Group\Backend $backend */
+ /**@var \PHPUnit\Framework\MockObject\MockObject|\OC\Group\Backend $backend */
$backendGroupCreated = false;
$backend = $this->getTestBackend(
GroupInterface::ADD_TO_GROUP |
}
public function testCreateExists() {
- /** @var \PHPUnit_Framework_MockObject_MockObject|\OC\Group\Backend $backend */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Group\Backend $backend */
$backend = $this->getTestBackend();
$backend->expects($this->any())
->method('groupExists')
public function testSearch() {
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend
*/
$backend = $this->getTestBackend();
$backend->expects($this->once())
public function testSearchMultipleBackends() {
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend1
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend1
*/
$backend1 = $this->getTestBackend();
$backend1->expects($this->once())
->willReturn(true);
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend2
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend2
*/
$backend2 = $this->getTestBackend();
$backend2->expects($this->once())
public function testSearchMultipleBackendsLimitAndOffset() {
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend1
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend1
*/
$backend1 = $this->getTestBackend();
$backend1->expects($this->once())
->willReturn(true);
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend2
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend2
*/
$backend2 = $this->getTestBackend();
$backend2->expects($this->once())
}
public function testSearchResultExistsButGroupDoesNot() {
- /** @var \PHPUnit_Framework_MockObject_MockObject|\OC\Group\Backend $backend */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Group\Backend $backend */
$backend = $this->createMock(Database::class);
$backend->expects($this->once())
->method('getGroups')
public function testGetUserGroups() {
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend
*/
$backend = $this->getTestBackend();
$backend->expects($this->once())
public function testGetUserGroupIds() {
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend
*/
$backend = $this->getTestBackend();
$backend->method('getUserGroups')
$manager = new \OC\Group\Manager($this->userManager, $this->dispatcher, $this->logger);
$manager->addBackend($backend);
- /** @var \OC\User\User|\PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var \OC\User\User|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$groups = $manager->getUserGroupIds($user);
public function testGetUserGroupsWithDeletedGroup() {
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend
*/
$backend = $this->createMock(Database::class);
$backend->expects($this->once())
$manager = new \OC\Group\Manager($this->userManager, $this->dispatcher, $this->logger);
$manager->addBackend($backend);
- /** @var \OC\User\User|\PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var \OC\User\User|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$user->expects($this->atLeastOnce())
->method('getUID')
public function testInGroup() {
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend
*/
$backend = $this->getTestBackend();
$backend->expects($this->once())
public function testIsAdmin() {
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend
*/
$backend = $this->getTestBackend();
$backend->expects($this->once())
public function testNotAdmin() {
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend
*/
$backend = $this->getTestBackend();
$backend->expects($this->once())
public function testGetUserGroupsMultipleBackends() {
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend1
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend1
*/
$backend1 = $this->getTestBackend();
$backend1->expects($this->once())
->willReturn(true);
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend2
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend2
*/
$backend2 = $this->getTestBackend();
$backend2->expects($this->once())
public function testDisplayNamesInGroupWithOneUserBackend() {
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend
*/
$backend = $this->getTestBackend();
$backend->expects($this->exactly(1))
public function testDisplayNamesInGroupWithOneUserBackendWithLimitSpecified() {
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend
*/
$backend = $this->getTestBackend();
$backend->expects($this->exactly(1))
public function testDisplayNamesInGroupWithOneUserBackendWithLimitAndOffsetSpecified() {
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend
*/
$backend = $this->getTestBackend();
$backend->expects($this->exactly(1))
public function testDisplayNamesInGroupWithOneUserBackendAndSearchEmpty() {
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend
*/
$backend = $this->getTestBackend();
$backend->expects($this->exactly(1))
public function testDisplayNamesInGroupWithOneUserBackendAndSearchEmptyAndLimitSpecified() {
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend
*/
$backend = $this->getTestBackend();
$backend->expects($this->exactly(1))
public function testDisplayNamesInGroupWithOneUserBackendAndSearchEmptyAndLimitAndOffsetSpecified() {
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend
*/
$backend = $this->getTestBackend();
$backend->expects($this->exactly(1))
public function testGetUserGroupsWithAddUser() {
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend
*/
$backend = $this->getTestBackend();
$expectedGroups = [];
public function testGetUserGroupsWithRemoveUser() {
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend
*/
$backend = $this->getTestBackend();
$expectedGroups = ['group1'];
public function testGetUserIdGroups() {
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend
*/
$backend = $this->getTestBackend();
$backend->expects($this->any())
public function testGroupDisplayName() {
/**
- * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend
+ * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend
*/
$backend = $this->getTestBackend(
GroupInterface::ADD_TO_GROUP |
class InstallerTest extends TestCase {
private static $appid = 'testapp';
private $appstore;
- /** @var AppFetcher|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var AppFetcher|\PHPUnit\Framework\MockObject\MockObject */
private $appFetcher;
- /** @var IClientService|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IClientService|\PHPUnit\Framework\MockObject\MockObject */
private $clientService;
- /** @var ITempManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITempManager|\PHPUnit\Framework\MockObject\MockObject */
private $tempManager;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
private $logger;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
protected function setUp(): void {
use Test\TestCase;
class CheckerTest extends TestCase {
- /** @var EnvironmentHelper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var EnvironmentHelper|\PHPUnit\Framework\MockObject\MockObject */
private $environmentHelper;
- /** @var AppLocator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var AppLocator|\PHPUnit\Framework\MockObject\MockObject */
private $appLocator;
/** @var Checker */
private $checker;
- /** @var FileAccessHelper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var FileAccessHelper|\PHPUnit\Framework\MockObject\MockObject */
private $fileAccessHelper;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var ICacheFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICacheFactory|\PHPUnit\Framework\MockObject\MockObject */
private $cacheFactory;
- /** @var IAppManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */
private $appManager;
- /** @var \OC\Files\Type\Detection|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC\Files\Type\Detection|\PHPUnit\Framework\MockObject\MockObject */
private $mimeTypeDetector;
protected function setUp(): void {
);
}
-
+
public function testWriteAppSignatureOfNotExistingApp() {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('Exception message');
$this->checker->writeAppSignature('NotExistingApp', $x509, $rsa);
}
-
+
public function testWriteAppSignatureWrongPermissions() {
$this->expectException(\Exception::class);
$this->expectExceptionMessageRegExp('/[a-zA-Z\\/_-]+ is not writable/');
$this->assertSame([], $this->checker->verifyAppSignature('SomeApp'));
}
-
+
public function testWriteCoreSignatureWithException() {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('Exception message');
$this->checker->writeCoreSignature($x509, $rsa, __DIR__);
}
-
+
public function testWriteCoreSignatureWrongPermissions() {
$this->expectException(\Exception::class);
$this->expectExceptionMessageRegExp('/[a-zA-Z\\/_-]+ is not writable/');
->method('getServerRoot')
->willReturn(\OC::$SERVERROOT . '/tests/data/integritycheck/mimetypeListModified');
$signatureDataFile = '{
- "hashes": {
+ "hashes": {
"mimetypelist.js": "dc48de7ad4baa030c5e563350c9a80b274bad783f6f5adbf1595ecef6c6a32e52890a24cb26cddb0aa20193ba52c001150c68d8bfb567f0aed566f4029a190a3"
},
"signature": "dtNDyufRB1jOG3e\/\/Ng6O3ZPnX5wgt3rrD9SpRQ66cpWlixwvGaI6knH85MkWm3q1c+hTYBipJ\/o+nJxHWoxydMXm+F6mC5MvXWfESB\/ag4fvKe0fg25yKstzlrpIyWwcnmOhLE\/sd7D8LZOQXk72PXsIJw4vX2YPyf3peHLevlUkVhB+mfYGDQJfrtPHjJII0Do+TV2MA0qm42q7SO\/zf7Ly24nZP3AoY5bYDMewlrczS2xz9tMN2ikZZcDgHvmC2W4RkaFP9E8ZeAZphKVjyQn6HdSu7EDlJgJ1YtoqTetFzNy\/q7+ODiJDB0KUzKocEDcXF2n2cTKXKCrklB6tEhEnjADhhQNxQouq2soc0ouIujifyH2zBL0sawNxGje5wpuchhCPnWcvQnSJbK1oXnv\/0wSGsp0iSslvx9NXAZ+nQbJnIuodLBl7XuTxxPVa8jDwFdJ7mLrs79ZfN2Op4qF10PiFRoz5VztJm4KWcaWnm\/Xqxke\/6yxY+gU2c6aH\/plwzkcxhdDJjNI\/d+G+b6NSadfcrduO+gTeHK\/go68mx0k1XxCln4Qu31nPmJZcboTvAtHvHXoeqZVAzMpT+jrq+vZ3oVAvFfNpvH4CA3eZebfkV13wV4RaSETyz5QNbnBL24C26aAhkzdShKHJc4NSNV9XdFqN74XEzSZGoc=",
*/
class FactoryTest extends TestCase {
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
protected $request;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
protected $userSession;
/** @var string */
/**
* @param array $methods
* @param bool $mockRequestGetHeaderMethod
- * @return Factory|\PHPUnit_Framework_MockObject_MockObject
+ * @return Factory|\PHPUnit\Framework\MockObject\MockObject
*/
protected function getFactory(array $methods = [], $mockRequestGetHeaderMethod = false) {
if ($mockRequestGetHeaderMethod) {
use Test\TestCase;
class LanguageIteratorTest extends TestCase {
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject */
protected $user;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
/** @var LanguageIterator */
protected $iterator;
* @package Test\Log
*/
class LogFactoryTest extends TestCase {
- /** @var IServerContainer|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IServerContainer|\PHPUnit\Framework\MockObject\MockObject */
protected $c;
/** @var LogFactory */
protected $factory;
- /** @var SystemConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var SystemConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $systemConfig;
protected function setUp(): void {
class LoggerTest extends TestCase implements IWriter {
- /** @var \OC\SystemConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC\SystemConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var \OCP\Support\CrashReport\IRegistry|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\Support\CrashReport\IRegistry|\PHPUnit\Framework\MockObject\MockObject */
private $registry;
/** @var \OCP\ILogger */
use Test\TestCase;
class EMailTemplateTest extends TestCase {
- /** @var Defaults|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Defaults|\PHPUnit\Framework\MockObject\MockObject */
private $defaults;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
private $urlGenerator;
- /** @var IFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IFactory|\PHPUnit\Framework\MockObject\MockObject */
private $l10n;
/** @var EMailTemplate */
private $emailTemplate;
use Swift_SwiftException;
class MailerTest extends TestCase {
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var Defaults|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Defaults|\PHPUnit\Framework\MockObject\MockObject */
private $defaults;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
private $logger;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
private $urlGenerator;
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l10n;
/** @var Mailer */
private $mailer;
}
public function testPlainTextRenderOption() {
- /** @var \PHPUnit_Framework_MockObject_MockObject|Swift_Message $swiftMessage */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|Swift_Message $swiftMessage */
$swiftMessage = $this->getMockBuilder('\Swift_Message')
->disableOriginalConstructor()->getMock();
- /** @var \PHPUnit_Framework_MockObject_MockObject|IEMailTemplate $template */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IEMailTemplate $template */
$template = $this->getMockBuilder('\OCP\Mail\IEMailTemplate')
->disableOriginalConstructor()->getMock();
}
public function testBothRenderingOptions() {
- /** @var \PHPUnit_Framework_MockObject_MockObject|Swift_Message $swiftMessage */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|Swift_Message $swiftMessage */
$swiftMessage = $this->getMockBuilder('\Swift_Message')
->disableOriginalConstructor()->getMock();
- /** @var \PHPUnit_Framework_MockObject_MockObject|IEMailTemplate $template */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IEMailTemplate $template */
$template = $this->getMockBuilder('\OCP\Mail\IEMailTemplate')
->disableOriginalConstructor()->getMock();
class BackgroundRepairTest extends TestCase {
- /** @var \OC\BackgroundJob\JobList|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC\BackgroundJob\JobList|\PHPUnit\Framework\MockObject\MockObject */
private $jobList;
- /** @var BackgroundRepair|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var BackgroundRepair|\PHPUnit\Framework\MockObject\MockObject */
private $job;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
private $logger;
- /** @var EventDispatcherInterface|\PHPUnit_Framework_MockObject_MockObject $dispatcher */
+ /** @var EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject $dispatcher */
private $dispatcher;
protected function setUp(): void {
use OCP\L10N\IFactory;
class NavigationManagerTest extends TestCase {
- /** @var AppManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var AppManager|\PHPUnit\Framework\MockObject\MockObject */
protected $appManager;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
protected $urlGenerator;
- /** @var IFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IFactory|\PHPUnit\Framework\MockObject\MockObject */
protected $l10nFac;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
protected $userSession;
- /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */
protected $groupManager;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
/** @var \OC\NavigationManager */
}
public function testNotify() {
- /** @var \OCP\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
+ /** @var \OCP\Notification\INotification|\PHPUnit\Framework\MockObject\MockObject $notification */
$notification = $this->getMockBuilder(INotification::class)
->disableOriginalConstructor()
->getMock();
$manager->notify($notification);
}
-
+
public function testNotifyInvalid() {
$this->expectException(\InvalidArgumentException::class);
- /** @var \OCP\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
+ /** @var \OCP\Notification\INotification|\PHPUnit\Framework\MockObject\MockObject $notification */
$notification = $this->getMockBuilder(INotification::class)
->disableOriginalConstructor()
->getMock();
}
public function testMarkProcessed() {
- /** @var \OCP\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
+ /** @var \OCP\Notification\INotification|\PHPUnit\Framework\MockObject\MockObject $notification */
$notification = $this->getMockBuilder(INotification::class)
->disableOriginalConstructor()
->getMock();
}
public function testGetCount() {
- /** @var \OCP\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
+ /** @var \OCP\Notification\INotification|\PHPUnit\Framework\MockObject\MockObject $notification */
$notification = $this->getMockBuilder(INotification::class)
->disableOriginalConstructor()
->getMock();
class NotificationTest extends TestCase {
/** @var INotification */
protected $notification;
- /** @var IValidator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IValidator|\PHPUnit\Framework\MockObject\MockObject */
protected $validator;
protected function setUp(): void {
}
public function testAddAction() {
- /** @var \OCP\Notification\IAction|\PHPUnit_Framework_MockObject_MockObject $action */
+ /** @var \OCP\Notification\IAction|\PHPUnit\Framework\MockObject\MockObject $action */
$action = $this->createMock(IAction::class);
$action->expects($this->once())
->method('isValid')
$this->assertEquals([], $this->notification->getParsedActions());
}
-
+
public function testAddActionInvalid() {
$this->expectException(\InvalidArgumentException::class);
- /** @var \OCP\Notification\IAction|\PHPUnit_Framework_MockObject_MockObject $action */
+ /** @var \OCP\Notification\IAction|\PHPUnit\Framework\MockObject\MockObject $action */
$action = $this->createMock(IAction::class);
$action->expects($this->once())
->method('isValid')
}
public function testAddActionSecondPrimary() {
- /** @var \OCP\Notification\IAction|\PHPUnit_Framework_MockObject_MockObject $action */
+ /** @var \OCP\Notification\IAction|\PHPUnit\Framework\MockObject\MockObject $action */
$action = $this->createMock(IAction::class);
$action->expects($this->exactly(2))
->method('isValid')
}
public function testAddParsedAction() {
- /** @var \OCP\Notification\IAction|\PHPUnit_Framework_MockObject_MockObject $action */
+ /** @var \OCP\Notification\IAction|\PHPUnit\Framework\MockObject\MockObject $action */
$action = $this->createMock(IAction::class);
$action->expects($this->once())
->method('isValidParsed')
$this->assertEquals([], $this->notification->getActions());
}
-
+
public function testAddParsedActionInvalid() {
$this->expectException(\InvalidArgumentException::class);
- /** @var \OCP\Notification\IAction|\PHPUnit_Framework_MockObject_MockObject $action */
+ /** @var \OCP\Notification\IAction|\PHPUnit\Framework\MockObject\MockObject $action */
$action = $this->createMock(IAction::class);
$action->expects($this->once())
->method('isValidParsed')
}
public function testAddActionSecondParsedPrimary() {
- /** @var \OCP\Notification\IAction|\PHPUnit_Framework_MockObject_MockObject $action */
+ /** @var \OCP\Notification\IAction|\PHPUnit\Framework\MockObject\MockObject $action */
$action = $this->createMock(IAction::class);
$action->expects($this->exactly(2))
->method('isValidParsed')
}
public function testAddActionParsedPrimaryEnd() {
- /** @var \OCP\Notification\IAction|\PHPUnit_Framework_MockObject_MockObject $action */
+ /** @var \OCP\Notification\IAction|\PHPUnit\Framework\MockObject\MockObject $action */
$action1 = $this->createMock(IAction::class);
$action1->expects($this->exactly(2))
->method('isValidParsed')
$action1->expects($this->exactly(2))
->method('isPrimary')
->willReturn(false);
- /** @var \OCP\Notification\IAction|\PHPUnit_Framework_MockObject_MockObject $action */
+ /** @var \OCP\Notification\IAction|\PHPUnit\Framework\MockObject\MockObject $action */
$action2 = $this->createMock(IAction::class);
$action2->expects($this->once())
->method('isValidParsed')
* @param bool $expected
*/
public function testIsValid($isValidCommon, $subject, $expected) {
- /** @var \OCP\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
+ /** @var \OCP\Notification\INotification|\PHPUnit\Framework\MockObject\MockObject $notification */
$notification = $this->getMockBuilder(Notification::class)
->setMethods([
'isValidCommon',
* @param bool $expected
*/
public function testIsParsedValid($isValidCommon, $subject, $expected) {
- /** @var \OCP\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
+ /** @var \OCP\Notification\INotification|\PHPUnit\Framework\MockObject\MockObject $notification */
$notification = $this->getMockBuilder(Notification::class)
->setMethods([
'isValidCommon',
* @param bool $expected
*/
public function testIsValidCommon($app, $user, $timestamp, $objectType, $objectId, $expected) {
- /** @var \OCP\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
+ /** @var \OCP\Notification\INotification|\PHPUnit\Framework\MockObject\MockObject $notification */
$notification = $this->getMockBuilder(Notification::class)
->setMethods([
'getApp',
class DiscoveryServiceTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject | ICacheFactory */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | ICacheFactory */
private $cacheFactory;
- /** @var \PHPUnit_Framework_MockObject_MockObject | IClientService */
+ /** @var \PHPUnit\Framework\MockObject\MockObject | IClientService */
private $clientService;
/** @var IDiscoveryService */
class GeneratorTest extends \Test\TestCase {
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var IPreview|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IPreview|\PHPUnit\Framework\MockObject\MockObject */
private $previewManager;
- /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */
private $appData;
- /** @var GeneratorHelper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var GeneratorHelper|\PHPUnit\Framework\MockObject\MockObject */
private $helper;
- /** @var EventDispatcherInterface|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject */
private $eventDispatcher;
/** @var Generator */
/** @var \OCP\IDBConnection */
protected $connection;
- /** @var \OCP\IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IUserManager|\PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
/** @var int */
$mount2 = $this->createMount($file2, 1337);
$this->assertStorage($mount2, 1337);
- /** @var IOutput|\PHPUnit_Framework_MockObject_MockObject $output */
+ /** @var IOutput|\PHPUnit\Framework\MockObject\MockObject $output */
$output = $this->createMock(IOutput::class);
$output->expects($this->at(0))
->method('info')
/** @var \OCP\IDBConnection */
protected $connection;
- /** @var \OCP\IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IGroupManager|\PHPUnit\Framework\MockObject\MockObject */
protected $groupManager;
protected function setUp(): void {
parent::setUp();
- /** \OCP\IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** \OCP\IGroupManager|\PHPUnit\Framework\MockObject\MockObject */
$this->groupManager = $this->getMockBuilder('OCP\IGroupManager')
->disableOriginalConstructor()
->getMock();
$this->assertEquals([['id' => $parent], ['id' => $group2], ['id' => $user1], ['id' => $member], ['id' => $notAMember]], $rows);
$result->closeCursor();
- /** @var IOutput | \PHPUnit_Framework_MockObject_MockObject $outputMock */
+ /** @var IOutput | \PHPUnit\Framework\MockObject\MockObject $outputMock */
$outputMock = $this->getMockBuilder('\OCP\Migration\IOutput')
->disableOriginalConstructor()
->getMock();
$tables = $this->repair->getAllNonUTF8BinTables($this->connection);
$this->assertGreaterThanOrEqual(1, count($tables));
- /** @var IOutput | \PHPUnit_Framework_MockObject_MockObject $outputMock */
+ /** @var IOutput | \PHPUnit\Framework\MockObject\MockObject $outputMock */
$outputMock = $this->getMockBuilder('\OCP\Migration\IOutput')
->disableOriginalConstructor()
->getMock();
$this->assertEquals([['id' => $parent], ['id' => $validChild], ['id' => $invalidChild]], $rows);
$result->closeCursor();
- /** @var IOutput | \PHPUnit_Framework_MockObject_MockObject $outputMock */
+ /** @var IOutput | \PHPUnit\Framework\MockObject\MockObject $outputMock */
$outputMock = $this->getMockBuilder('\OCP\Migration\IOutput')
->disableOriginalConstructor()
->getMock();
$shareId = $this->getLastShareId();
- /** @var IOutput | \PHPUnit_Framework_MockObject_MockObject $outputMock */
+ /** @var IOutput | \PHPUnit\Framework\MockObject\MockObject $outputMock */
$outputMock = $this->getMockBuilder('\OCP\Migration\IOutput')
->disableOriginalConstructor()
->getMock();
$this->savedMimetypeLoader = \OC::$server->getMimeTypeLoader();
$this->mimetypeLoader = \OC::$server->getMimeTypeLoader();
- /** @var IConfig | \PHPUnit_Framework_MockObject_MockObject $config */
+ /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject $config */
$config = $this->getMockBuilder(IConfig::class)
->disableOriginalConstructor()
->getMock();
private function renameMimeTypes($currentMimeTypes, $fixedMimeTypes) {
$this->addEntries($currentMimeTypes);
- /** @var IOutput | \PHPUnit_Framework_MockObject_MockObject $outputMock */
+ /** @var IOutput | \PHPUnit\Framework\MockObject\MockObject $outputMock */
$outputMock = $this->getMockBuilder('\OCP\Migration\IOutput')
->disableOriginalConstructor()
->getMock();
public function testConvertIdColumn() {
$this->assertFalse($this->checkAutoincrement());
- /** @var IOutput | \PHPUnit_Framework_MockObject_MockObject $outputMock */
+ /** @var IOutput | \PHPUnit\Framework\MockObject\MockObject $outputMock */
$outputMock = $this->getMockBuilder('\OCP\Migration\IOutput')
->disableOriginalConstructor()
->getMock();
/** @var Capabilities */
private $capabilities;
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var Throttler|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Throttler|\PHPUnit\Framework\MockObject\MockObject */
private $throttler;
protected function setUp(): void {
private $dbConnection;
/** @var ILogger */
private $logger;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
protected function setUp(): void {
'dead:beef:cafe::1111',
[
'whitelist_0' => 'dead:beef:cafe::1100/123',
-
+
],
true,
],
$this->assertEqualsArrays($certificateStore, $this->certificateManager->listCertificates());
}
-
+
public function testAddInvalidCertificate() {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('Certificate could not get parsed.');
->disableOriginalConstructor()->getMock();
$config = $this->createMock(IConfig::class);
- /** @var CertificateManager | \PHPUnit_Framework_MockObject_MockObject $certificateManager */
+ /** @var CertificateManager | \PHPUnit\Framework\MockObject\MockObject $certificateManager */
$certificateManager = $this->getMockBuilder('OC\Security\CertificateManager')
->setConstructorArgs([$uid, $view, $config, $this->createMock(ILogger::class), $this->random])
->setMethods(['getFilemtimeOfCaBundle', 'getCertificateBundle'])
protected function setUp(): void {
parent::setUp();
- /** @var Factory|\PHPUnit_Framework_MockObject_MockObject $factory */
+ /** @var Factory|\PHPUnit\Framework\MockObject\MockObject $factory */
$this->factory = $this->createMock(Factory::class);
$this->appData = $this->createMock(AppData::class);
$this->config = $this->createMock(IConfig::class);
* create manager object
*
* @param array $setMethods
- * @return Manager|\PHPUnit_Framework_MockObject_MockObject
+ * @return Manager|\PHPUnit\Framework\MockObject\MockObject
*/
protected function getManager($setMethods = []) {
if (empty($setMethods)) {
public function testGetSystemKey() {
$manager = $this->getManager(['retrieveKey']);
- /** @var Key|\PHPUnit_Framework_MockObject_MockObject $key */
+ /** @var Key|\PHPUnit\Framework\MockObject\MockObject $key */
$key = $this->createMock(Key::class);
$this->config->expects($this->once())->method('getSystemValue')
}
-
+
public function testGetSystemKeyFailure() {
$this->expectException(\RuntimeException::class);
$manager = $this->getManager(['retrieveKey']);
- /** @var Key|\PHPUnit_Framework_MockObject_MockObject $key */
+ /** @var Key|\PHPUnit\Framework\MockObject\MockObject $key */
$key = $this->createMock(Key::class);
$this->config->expects($this->once())->method('getSystemValue')
/** @var Key */
private $key;
- /** @var Manager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Manager|\PHPUnit\Framework\MockObject\MockObject */
private $keyManager;
- /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
private $timeFactory;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
private $userManager;
/** @var Signer */
use Test\TestCase;
class MemoryCacheTest extends TestCase {
- /** @var ICacheFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICacheFactory|\PHPUnit\Framework\MockObject\MockObject */
private $cacheFactory;
- /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
private $timeFactory;
- /** @var ICache|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICache|\PHPUnit\Framework\MockObject\MockObject */
private $cache;
/** @var MemoryCache */
private $memoryCache;
use Test\TestCase;
class LimiterTest extends TestCase {
- /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
private $timeFactory;
- /** @var IBackend|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IBackend|\PHPUnit\Framework\MockObject\MockObject */
private $backend;
/** @var Limiter */
private $limiter;
);
}
-
+
public function testRegisterAnonRequestExceeded() {
$this->expectException(\OC\Security\RateLimiting\Exception\RateLimitExceededException::class);
$this->expectExceptionMessage('Rate limit exceeded');
$this->limiter->registerAnonRequest('MyIdentifier', 100, 100, '127.0.0.1');
}
-
+
public function testRegisterUserRequestExceeded() {
$this->expectException(\OC\Security\RateLimiting\Exception\RateLimitExceededException::class);
$this->expectExceptionMessage('Rate limit exceeded');
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$user
->expects($this->once())
}
public function testRegisterUserRequestSuccess() {
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$user
->expects($this->once())
use OCP\Security\ICrypto;
class CryptoSessionDataTest extends Session {
- /** @var \PHPUnit_Framework_MockObject_MockObject|\OCP\Security\ICrypto */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|\OCP\Security\ICrypto */
protected $crypto;
/** @var \OCP\ISession */
use Test\TestCase;
class CryptoWrappingTest extends TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject|\OCP\Security\ICrypto */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|\OCP\Security\ICrypto */
protected $crypto;
- /** @var \PHPUnit_Framework_MockObject_MockObject|\OCP\ISession */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|\OCP\ISession */
protected $wrappedSession;
/** @var \OC\Session\CryptoSessionData */
class ManagerTest extends TestCase {
- /** @var Manager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Manager|\PHPUnit\Framework\MockObject\MockObject */
private $manager;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
private $logger;
- /** @var IDBConnection|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IDBConnection|\PHPUnit\Framework\MockObject\MockObject */
private $l10n;
- /** @var IFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IFactory|\PHPUnit\Framework\MockObject\MockObject */
private $l10nFactory;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
private $url;
- /** @var IServerContainer|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IServerContainer|\PHPUnit\Framework\MockObject\MockObject */
private $container;
protected function setUp(): void {
class SetupTest extends \Test\TestCase {
- /** @var SystemConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var SystemConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var \bantu\IniGetWrapper\IniGetWrapper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \bantu\IniGetWrapper\IniGetWrapper|\PHPUnit\Framework\MockObject\MockObject */
private $iniWrapper;
- /** @var \OCP\IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l10n;
- /** @var Defaults|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Defaults|\PHPUnit\Framework\MockObject\MockObject */
private $defaults;
- /** @var \OC\Setup|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC\Setup|\PHPUnit\Framework\MockObject\MockObject */
protected $setupClass;
- /** @var \OCP\ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\ILogger|\PHPUnit\Framework\MockObject\MockObject */
protected $logger;
- /** @var \OCP\Security\ISecureRandom|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\Security\ISecureRandom|\PHPUnit\Framework\MockObject\MockObject */
protected $random;
- /** @var Installer|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Installer|\PHPUnit\Framework\MockObject\MockObject */
protected $installer;
protected function setUp(): void {
$this->assertSame($expectedResult, $result);
}
-
+
public function testGetSupportedDatabaseException() {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('Supported databases are not properly configured.');
/** @var IDBConnection */
protected $dbConn;
- /** @var IUserManager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager | \PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
- /** @var IGroupManager | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IGroupManager | \PHPUnit\Framework\MockObject\MockObject */
protected $groupManager;
- /** @var IRootFolder | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRootFolder | \PHPUnit\Framework\MockObject\MockObject */
protected $rootFolder;
/** @var DefaultShareProvider */
protected $provider;
- /** @var \PHPUnit_Framework_MockObject_MockObject|IMailer */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IMailer */
protected $mailer;
/** @var IFactory|MockObject */
protected $l10nFactory;
- /** @var \PHPUnit_Framework_MockObject_MockObject|IL10N */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IL10N */
protected $l10n;
- /** @var \PHPUnit_Framework_MockObject_MockObject|Defaults */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|Defaults */
protected $defaults;
- /** @var \PHPUnit_Framework_MockObject_MockObject|IURLGenerator */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IURLGenerator */
protected $urlGenerator;
/** @var IConfig|MockObject */
class ShareHelperTest extends TestCase {
- /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
private $manager;
/** @var ShareHelper */
'remote' => $remoteList,
]);
- /** @var Node|\PHPUnit_Framework_MockObject_MockObject $node */
+ /** @var Node|\PHPUnit\Framework\MockObject\MockObject $node */
$node = $this->createMock(Node::class);
- /** @var ShareHelper|\PHPUnit_Framework_MockObject_MockObject $helper */
+ /** @var ShareHelper|\PHPUnit\Framework\MockObject\MockObject $helper */
$helper = $this->getMockBuilder(ShareHelper::class)
->setConstructorArgs([$this->manager])
->setMethods(['getPathsForUsers', 'getPathsForRemotes'])
public function testGetPathsForUsers(array $users, array $nodes, array $expected) {
$lastNode = null;
foreach ($nodes as $nodeId => $nodeName) {
- /** @var Node|\PHPUnit_Framework_MockObject_MockObject $node */
+ /** @var Node|\PHPUnit\Framework\MockObject\MockObject $node */
$node = $this->createMock(Node::class);
$node->expects($this->any())
->method('getId')
public function testGetPathsForRemotes(array $remotes, array $nodes, array $expected) {
$lastNode = null;
foreach ($nodes as $nodeId => $nodePath) {
- /** @var Node|\PHPUnit_Framework_MockObject_MockObject $node */
+ /** @var Node|\PHPUnit\Framework\MockObject\MockObject $node */
$node = $this->createMock(Node::class);
$node->expects($this->any())
->method('getId')
* @param string $expected
*/
public function testGetMountedPath($path, $expected) {
- /** @var Node|\PHPUnit_Framework_MockObject_MockObject $node */
+ /** @var Node|\PHPUnit\Framework\MockObject\MockObject $node */
$node = $this->createMock(Node::class);
$node->expects($this->once())
->method('getPath')
*/
class ShareTest extends \Test\TestCase {
- /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */
protected $rootFolder;
/** @var \OCP\Share\IShare */
protected $share;
$this->share = new \OC\Share20\Share($this->rootFolder, $this->userManager);
}
-
+
public function testSetIdInvalid() {
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('String expected.');
$this->assertEquals('foo', $this->share->getId());
}
-
+
public function testSetIdOnce() {
$this->expectException(\OCP\Share\Exceptions\IllegalIDChangeException::class);
$this->expectExceptionMessage('Not allowed to assign a new internal id to a share');
$this->share->setId('bar');
}
-
+
public function testSetProviderIdInt() {
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('String expected.');
$this->assertEquals('foo:bar', $this->share->getFullId());
}
-
+
public function testSetProviderIdOnce() {
$this->expectException(\OCP\Share\Exceptions\IllegalIDChangeException::class);
$this->expectExceptionMessage('Not allowed to assign a new provider id to a share');
}
public function testDelegateHasValidSubscription() {
- /* @var ISubscription|\PHPUnit_Framework_MockObject_MockObject $subscription */
+ /* @var ISubscription|\PHPUnit\Framework\MockObject\MockObject $subscription */
$subscription = $this->createMock(ISubscription::class);
$subscription->expects($this->once())
->method('hasValidSubscription')
}
public function testDelegateHasValidSubscriptionConfig() {
- /* @var ISubscription|\PHPUnit_Framework_MockObject_MockObject $subscription */
+ /* @var ISubscription|\PHPUnit\Framework\MockObject\MockObject $subscription */
$this->config->expects($this->once())
->method('getSystemValueBool')
->with('has_valid_subscription')
}
public function testDelegateHasExtendedSupport() {
- /* @var ISubscription|\PHPUnit_Framework_MockObject_MockObject $subscription */
+ /* @var ISubscription|\PHPUnit\Framework\MockObject\MockObject $subscription */
$subscription = $this->createMock(ISubscription::class);
$subscription->expects($this->once())
->method('hasExtendedSupport')
public function testDelegateGetSupportedApps() {
- /* @var ISupportedApps|\PHPUnit_Framework_MockObject_MockObject $subscription */
+ /* @var ISupportedApps|\PHPUnit\Framework\MockObject\MockObject $subscription */
$subscription = $this->createMock(ISupportedApps::class);
$subscription->expects($this->once())
->method('getSupportedApps')
use OCP\IURLGenerator;
class CSSResourceLocatorTest extends \Test\TestCase {
- /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */
protected $appData;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
protected $urlGenerator;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var ThemingDefaults|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ThemingDefaults|\PHPUnit\Framework\MockObject\MockObject */
protected $themingDefaults;
- /** @var ICacheFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICacheFactory|\PHPUnit\Framework\MockObject\MockObject */
protected $cacheFactory;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
protected $logger;
- /** @var IconsCacher|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IconsCacher|\PHPUnit\Framework\MockObject\MockObject */
protected $iconsCacher;
- /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
private $timeFactory;
protected function setUp(): void {
}
private function cssResourceLocator() {
- /** @var Factory|\PHPUnit_Framework_MockObject_MockObject $factory */
+ /** @var Factory|\PHPUnit\Framework\MockObject\MockObject $factory */
$factory = $this->createMock(Factory::class);
$factory->method('get')->with('css')->willReturn($this->appData);
$scssCacher = new SCSSCacher(
use OCP\IURLGenerator;
class IconsCacherTest extends \Test\TestCase {
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
protected $logger;
- /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */
protected $appData;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
protected $urlGenerator;
- /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
private $timeFactory;
protected function setUp(): void {
$this->appData = $this->createMock(AppData::class);
$this->timeFactory = $this->createMock(ITimeFactory::class);
- /** @var Factory|\PHPUnit_Framework_MockObject_MockObject $factory */
+ /** @var Factory|\PHPUnit\Framework\MockObject\MockObject $factory */
$factory = $this->createMock(Factory::class);
$factory->method('get')->with('css')->willReturn($this->appData);
use OCP\IURLGenerator;
class JSCombinerTest extends \Test\TestCase {
- /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */
protected $appData;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
protected $urlGenerator;
- /** @var SystemConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var SystemConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var ICache|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICache|\PHPUnit\Framework\MockObject\MockObject */
protected $depsCache;
/** @var JSCombiner */
protected $jsCombiner;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
protected $logger;
- /** @var ICacheFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICacheFactory|\PHPUnit\Framework\MockObject\MockObject */
protected $cacheFactory;
protected function setUp(): void {
use OCP\IURLGenerator;
class JSResourceLocatorTest extends \Test\TestCase {
- /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */
protected $appData;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
protected $urlGenerator;
- /** @var SystemConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var SystemConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var ICacheFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICacheFactory|\PHPUnit\Framework\MockObject\MockObject */
protected $cacheFactory;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
protected $logger;
protected function setUp(): void {
use OCP\ILogger;
class ResourceLocatorTest extends \Test\TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \PHPUnit\Framework\MockObject\MockObject */
protected $logger;
protected function setUp(): void {
* @param array $core_map
* @param array $party_map
* @param array $appsRoots
- * @return \PHPUnit_Framework_MockObject_MockObject
+ * @return \PHPUnit\Framework\MockObject\MockObject
*/
public function getResourceLocator($theme, $core_map, $party_map, $appsRoots) {
return $this->getMockForAbstractClass('OC\Template\ResourceLocator',
use OCP\IURLGenerator;
class SCSSCacherTest extends \Test\TestCase {
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
protected $logger;
- /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */
protected $appData;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
protected $urlGenerator;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var ThemingDefaults|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ThemingDefaults|\PHPUnit\Framework\MockObject\MockObject */
protected $themingDefaults;
/** @var SCSSCacher */
protected $scssCacher;
- /** @var ICache|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICache|\PHPUnit\Framework\MockObject\MockObject */
protected $depsCache;
- /** @var ICacheFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICacheFactory|\PHPUnit\Framework\MockObject\MockObject */
protected $cacheFactory;
- /** @var IconsCacher|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IconsCacher|\PHPUnit\Framework\MockObject\MockObject */
protected $iconsCacher;
- /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
protected $timeFactory;
protected function setUp(): void {
$this->iconsCacher = $this->createMock(IconsCacher::class);
$this->timeFactory = $this->createMock(ITimeFactory::class);
- /** @var Factory|\PHPUnit_Framework_MockObject_MockObject $factory */
+ /** @var Factory|\PHPUnit\Framework\MockObject\MockObject $factory */
$factory = $this->createMock(Factory::class);
$factory->method('get')->with('css')->willReturn($this->appData);
require_once __DIR__.'/../../lib/private/legacy/template/functions.php';
$requestToken = 12345;
- /** @var Defaults|\PHPUnit_Framework_MockObject_MockObject $l10n */
+ /** @var Defaults|\PHPUnit\Framework\MockObject\MockObject $l10n */
$theme = $this->getMockBuilder('\OCP\Defaults')
->disableOriginalConstructor()->getMock();
$theme->expects($this->any())
->method('getName')
->willReturn('Nextcloud');
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject $l10n */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject $l10n */
$l10n = $this->getMockBuilder(IL10N::class)
->disableOriginalConstructor()->getMock();
$l10n
use OCP\Http\Client\IResponse;
trait ClientServiceTrait {
- /** @var IClientService|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IClientService|\PHPUnit\Framework\MockObject\MockObject */
private $clientService;
- /** @var IClient|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IClient|\PHPUnit\Framework\MockObject\MockObject */
private $client;
private $expectedGetRequests = [];
private $expectedPostRequests = [];
* Wrapper to be forward compatible to phpunit 5.4+
*
* @param string $originalClassName
- * @return \PHPUnit_Framework_MockObject_MockObject
+ * @return \PHPUnit\Framework\MockObject\MockObject
*/
abstract protected function createMock($originalClassName);
}
/**
- * @return IClientService|\PHPUnit_Framework_MockObject_MockObject
+ * @return IClientService|\PHPUnit\Framework\MockObject\MockObject
*/
protected function getClientService() {
return $this->clientService;
use Test\TestCase;
class ChangesCheckTest extends TestCase {
- /** @var IClientService|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IClientService|\PHPUnit\Framework\MockObject\MockObject */
protected $clientService;
/** @var ChangesCheck */
protected $checker;
- /** @var ChangesMapper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ChangesMapper|\PHPUnit\Framework\MockObject\MockObject */
protected $mapper;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
protected $logger;
protected function setUp(): void {
use OCP\Util;
class VersionCheckTest extends \Test\TestCase {
- /** @var IConfig| \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig| \PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var VersionCheck | \PHPUnit_Framework_MockObject_MockObject*/
+ /** @var VersionCheck | \PHPUnit\Framework\MockObject\MockObject*/
private $updater;
protected function setUp(): void {
use OCP\ILogger;
class UpdaterTest extends TestCase {
- /** @var IConfig | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject */
private $config;
- /** @var ILogger | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger | \PHPUnit\Framework\MockObject\MockObject */
private $logger;
/** @var Updater */
private $updater;
- /** @var Checker | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var Checker | \PHPUnit\Framework\MockObject\MockObject */
private $checker;
- /** @var Installer|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Installer|\PHPUnit\Framework\MockObject\MockObject */
private $installer;
protected function setUp(): void {
*/
class UrlGeneratorTest extends \Test\TestCase {
- /** @var \PHPUnit_Framework_MockObject_MockObject|IConfig */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IConfig */
private $config;
- /** @var \PHPUnit_Framework_MockObject_MockObject|ICacheFactory */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|ICacheFactory */
private $cacheFactory;
- /** @var \PHPUnit_Framework_MockObject_MockObject|IRequest */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|IRequest */
private $request;
/** @var IURLGenerator */
private $urlGenerator;
public function testUserExistsSingleBackendExists() {
/**
- * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
$backend->expects($this->once())
public function testUserExistsSingleBackendNotExists() {
/**
- * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
$backend->expects($this->once())
public function testUserExistsTwoBackendsSecondExists() {
/**
- * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend1
+ * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend1
*/
$backend1 = $this->createMock(\Test\Util\User\Dummy::class);
$backend1->expects($this->once())
->willReturn(false);
/**
- * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend2
+ * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend2
*/
$backend2 = $this->createMock(\Test\Util\User\Dummy::class);
$backend2->expects($this->once())
public function testUserExistsTwoBackendsFirstExists() {
/**
- * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend1
+ * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend1
*/
$backend1 = $this->createMock(\Test\Util\User\Dummy::class);
$backend1->expects($this->once())
->willReturn(true);
/**
- * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend2
+ * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend2
*/
$backend2 = $this->createMock(\Test\Util\User\Dummy::class);
$backend2->expects($this->never())
public function testCheckPassword() {
/**
- * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
$backend->expects($this->once())
public function testCheckPasswordNotSupported() {
/**
- * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
$backend->expects($this->never())
public function testGetOneBackendExists() {
/**
- * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
$backend->expects($this->once())
public function testGetOneBackendNotExists() {
/**
- * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
$backend->expects($this->once())
public function testGetOneBackendDoNotTranslateLoginNames() {
/**
- * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
$backend->expects($this->once())
public function testSearchOneBackend() {
/**
- * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
$backend->expects($this->once())
public function testSearchTwoBackendLimitOffset() {
/**
- * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend1
+ * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend1
*/
$backend1 = $this->createMock(\Test\Util\User\Dummy::class);
$backend1->expects($this->once())
->method('loginName2UserName');
/**
- * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend2
+ * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend2
*/
$backend2 = $this->createMock(\Test\Util\User\Dummy::class);
$backend2->expects($this->once())
* @dataProvider dataCreateUserInvalid
*/
public function testCreateUserInvalid($uid, $password, $exception) {
- /** @var \Test\Util\User\Dummy|\PHPUnit_Framework_MockObject_MockObject $backend */
+ /** @var \Test\Util\User\Dummy|\PHPUnit\Framework\MockObject\MockObject $backend */
$backend = $this->createMock(\Test\Util\User\Dummy::class);
$backend->expects($this->once())
->method('implementsActions')
public function testCreateUserSingleBackendNotExists() {
/**
- * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
$backend->expects($this->any())
$this->expectException(\Exception::class);
/**
- * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
$backend->expects($this->any())
public function testCreateUserSingleBackendNotSupported() {
/**
- * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
$backend->expects($this->any())
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Could not create user');
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject $config */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject $config */
$config = $this->createMock(IConfig::class);
- /** @var \Test\Util\User\Dummy|\PHPUnit_Framework_MockObject_MockObject $backend */
+ /** @var \Test\Util\User\Dummy|\PHPUnit\Framework\MockObject\MockObject $backend */
$backend = $this->createMock(\Test\Util\User\Dummy::class);
$backend
->expects($this->once())
$this->expectException(\Exception::class);
/**
- * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend1
+ * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend1
*/
$backend1 = $this->createMock(\Test\Util\User\Dummy::class);
$backend1->expects($this->any())
->willReturn(false);
/**
- * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend2
+ * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend2
*/
$backend2 = $this->createMock(\Test\Util\User\Dummy::class);
$backend2->expects($this->any())
public function testCountUsersOneBackend() {
/**
- * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
$backend->expects($this->once())
public function testCountUsersTwoBackends() {
/**
- * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend1 = $this->createMock(\Test\Util\User\Dummy::class);
$backend1->expects($this->once())
public function testDisplayName() {
/**
- * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\OC\User\Backend::class);
$backend->expects($this->once())
*/
public function testDisplayNameEmpty() {
/**
- * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\OC\User\Backend::class);
$backend->expects($this->once())
public function testDisplayNameNotSupported() {
/**
- * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var \OC\User\Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\OC\User\Backend::class);
$backend->expects($this->never())
public function testSetPassword() {
/**
- * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
$backend->expects($this->once())
public function testSetPasswordNotSupported() {
/**
- * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
$backend->expects($this->never())
public function testChangeAvatarSupportedYes() {
/**
- * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(AvatarUserDummy::class);
$backend->expects($this->once())
public function testChangeAvatarSupportedNo() {
/**
- * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(AvatarUserDummy::class);
$backend->expects($this->once())
public function testChangeAvatarNotSupported() {
/**
- * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(AvatarUserDummy::class);
$backend->expects($this->never())
public function testDelete() {
/**
- * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
$backend->expects($this->once())
public function testDeleteWithDifferentHome() {
/**
- * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
public function testGetHome() {
/**
- * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
$backend->expects($this->once())
public function testGetHomeNotSupported() {
/**
- * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
$backend->expects($this->never())
public function testCanChangePassword() {
/**
- * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
public function testCanChangePasswordNotSupported() {
/**
- * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
public function testCanChangeDisplayName() {
/**
- * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
public function testCanChangeDisplayNameNotSupported() {
/**
- * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
public function testSetDisplayNameSupported() {
/**
- * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\OC\User\Database::class);
*/
public function testSetDisplayNameEmpty() {
/**
- * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\OC\User\Database::class);
public function testSetDisplayNameNotSupported() {
/**
- * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\OC\User\Database::class);
$test = $this;
/**
- * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
$backend->expects($this->once())
$test = $this;
/**
- * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
$backend->expects($this->once())
public function testGetCloudId() {
/**
- * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
$urlGenerator = $this->getMockBuilder('\OC\URLGenerator')
public function testSetEMailAddressEmpty() {
/**
- * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
public function testSetEMailAddress() {
/**
- * @var UserInterface | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var UserInterface | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
public function testSetEMailAddressNoChange() {
/**
- * @var UserInterface | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var UserInterface | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
- /** @var PublicEmitter|\PHPUnit_Framework_MockObject_MockObject $emitter */
+ /** @var PublicEmitter|\PHPUnit\Framework\MockObject\MockObject $emitter */
$emitter = $this->createMock(PublicEmitter::class);
$emitter->expects($this->never())
->method('emit');
public function testSetQuota() {
/**
- * @var UserInterface | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var UserInterface | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
public function testSetQuotaAddressNoChange() {
/**
- * @var UserInterface | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var UserInterface | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
- /** @var PublicEmitter|\PHPUnit_Framework_MockObject_MockObject $emitter */
+ /** @var PublicEmitter|\PHPUnit\Framework\MockObject\MockObject $emitter */
$emitter = $this->createMock(PublicEmitter::class);
$emitter->expects($this->never())
->method('emit');
public function testGetLastLogin() {
/**
- * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
public function testSetEnabled() {
/**
- * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
public function testSetDisabled() {
/**
- * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
public function testSetDisabledAlreadyDisabled() {
/**
- * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
public function testGetEMailAddress() {
/**
- * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend
+ * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend
*/
$backend = $this->createMock(\Test\Util\User\Dummy::class);
/**
* @param array $systemOptions
- * @return \OC\SystemConfig | \PHPUnit_Framework_MockObject_MockObject
+ * @return \OC\SystemConfig | \PHPUnit\Framework\MockObject\MockObject
*/
protected function getConfig($systemOptions) {
$systemOptions['datadirectory'] = $this->datadir;