Merge pull request #24844 from owncloud/dav-test-psr4

Move DAV Tests to PSR-4
This commit is contained in:
Vincent Petry 2016-05-25 17:26:32 +02:00
commit fa5fd68d75
63 changed files with 127 additions and 112 deletions

View File

@ -19,7 +19,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\AppInfo; namespace OCA\DAV\Tests\unit\AppInfo;
use OCA\DAV\AppInfo\Application; use OCA\DAV\AppInfo\Application;
use OCP\Contacts\IManager; use OCP\Contacts\IManager;

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/> * along with this program. If not, see <http://www.gnu.org/licenses/>
* *
*/ */
namespace Tests\Connector\Sabre;
namespace OCA\DAV\Tests\unit\CalDAV;
use DateTime; use DateTime;
use DateTimeZone; use DateTimeZone;
@ -37,7 +38,7 @@ use Test\TestCase;
* *
* @group DB * @group DB
* *
* @package Tests\Connector\Sabre * @package OCA\DAV\Tests\unit\CalDAV
*/ */
class CalDavBackendTest extends TestCase { class CalDavBackendTest extends TestCase {

View File

@ -19,7 +19,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\CalDAV; namespace OCA\DAV\Tests\unit\CalDAV;
use OCA\DAV\CalDAV\BirthdayService; use OCA\DAV\CalDAV\BirthdayService;
use OCA\DAV\CalDAV\CalDavBackend; use OCA\DAV\CalDAV\CalDavBackend;

View File

@ -19,7 +19,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\CalDAV\Schedule; namespace OCA\DAV\Tests\unit\CalDAV\Schedule;
use OC\Mail\Mailer; use OC\Mail\Mailer;
use OCA\DAV\CalDAV\Schedule\IMipPlugin; use OCA\DAV\CalDAV\Schedule\IMipPlugin;

View File

@ -21,7 +21,7 @@
*/ */
namespace OCA\DAV\Tests\Unit\CardDAV; namespace OCA\DAV\Tests\unit\CardDAV;
use OCA\DAV\CardDAV\AddressBook; use OCA\DAV\CardDAV\AddressBook;

View File

@ -19,7 +19,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\CardDAV; namespace OCA\DAV\Tests\unit\CardDAV;
use OCA\DAV\CardDAV\AddressBook; use OCA\DAV\CardDAV\AddressBook;
use OCA\DAV\CardDAV\CardDavBackend; use OCA\DAV\CardDAV\CardDavBackend;

View File

@ -19,7 +19,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\CardDAV; namespace OCA\DAV\Tests\unit\CardDAV;
use OCA\DAV\CalDAV\BirthdayService; use OCA\DAV\CalDAV\BirthdayService;
use OCA\DAV\CalDAV\CalDavBackend; use OCA\DAV\CalDAV\CalDavBackend;

View File

@ -21,7 +21,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/> * along with this program. If not, see <http://www.gnu.org/licenses/>
* *
*/ */
namespace OCA\DAV\Tests\Unit\CardDAV;
namespace OCA\DAV\Tests\unit\CardDAV;
use InvalidArgumentException; use InvalidArgumentException;
use OCA\DAV\CardDAV\AddressBook; use OCA\DAV\CardDAV\AddressBook;
@ -39,7 +40,7 @@ use Test\TestCase;
* *
* @group DB * @group DB
* *
* @package OCA\DAV\Tests\Unit\CardDAV * @package OCA\DAV\Tests\unit\CardDAV
*/ */
class CardDavBackendTest extends TestCase { class CardDavBackendTest extends TestCase {

View File

@ -19,7 +19,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\CardDAV; namespace OCA\DAV\Tests\unit\CardDAV;
use OCA\DAV\CardDAV\CardDavBackend; use OCA\DAV\CardDAV\CardDavBackend;
use OCA\DAV\CardDAV\ContactsManager; use OCA\DAV\CardDAV\ContactsManager;

View File

@ -20,12 +20,12 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit; namespace OCA\DAV\Tests\unit\CardDAV;
use OCA\DAV\CardDAV\Converter; use OCA\DAV\CardDAV\Converter;
use Test\TestCase; use Test\TestCase;
class ConverterTests extends TestCase { class ConverterTest extends TestCase {
/** /**
* @dataProvider providesNewUsers * @dataProvider providesNewUsers

View File

@ -19,7 +19,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\CardDAV; namespace OCA\DAV\Tests\unit\CardDAV\Sharing;
use OCA\DAV\DAV\Sharing\IShareable; use OCA\DAV\DAV\Sharing\IShareable;

View File

@ -19,8 +19,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/> * along with this program. If not, see <http://www.gnu.org/licenses/>
* *
*/ */
namespace OCA\DAV\CardDAV;
namespace OCA\DAV\Tests\unit\CardDAV;
use OCA\DAV\CardDAV\CardDavBackend;
use OCA\DAV\CardDAV\SyncService;
use OCP\IUser; use OCP\IUser;
use OCP\IUserManager; use OCP\IUserManager;
use Test\TestCase; use Test\TestCase;

View File

@ -19,13 +19,13 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\Comments; namespace OCA\DAV\Tests\unit\Comments;
use OCA\DAV\Comments\CommentNode; use OCA\DAV\Comments\CommentNode;
use OCP\Comments\IComment; use OCP\Comments\IComment;
use OCP\Comments\MessageTooLongException; use OCP\Comments\MessageTooLongException;
class CommentsNode extends \Test\TestCase { class CommentsNodeTest extends \Test\TestCase {
protected $commentsManager; protected $commentsManager;
protected $comment; protected $comment;

View File

@ -20,14 +20,14 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\Comments; namespace OCA\DAV\Tests\unit\Comments;
use OC\Comments\Comment; use OC\Comments\Comment;
use OCA\DAV\Comments\CommentsPlugin as CommentsPluginImplementation; use OCA\DAV\Comments\CommentsPlugin as CommentsPluginImplementation;
use OCP\Comments\IComment; use OCP\Comments\IComment;
use Sabre\DAV\Exception\NotFound; use Sabre\DAV\Exception\NotFound;
class CommentsPlugin extends \Test\TestCase { class CommentsPluginTest extends \Test\TestCase {
/** @var \Sabre\DAV\Server */ /** @var \Sabre\DAV\Server */
private $server; private $server;

View File

@ -19,9 +19,9 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\Comments; namespace OCA\DAV\Tests\unit\Comments;
class EntityCollection extends \Test\TestCase { class EntityCollectionTest extends \Test\TestCase {
/** @var \OCP\Comments\ICommentsManager|\PHPUnit_Framework_MockObject_MockObject */ /** @var \OCP\Comments\ICommentsManager|\PHPUnit_Framework_MockObject_MockObject */
protected $commentsManager; protected $commentsManager;

View File

@ -19,11 +19,11 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\Comments; namespace OCA\DAV\Tests\unit\Comments;
use OCA\DAV\Comments\EntityCollection as EntityCollectionImplemantation; use OCA\DAV\Comments\EntityCollection as EntityCollectionImplemantation;
class EntityTypeCollection extends \Test\TestCase { class EntityTypeCollectionTest extends \Test\TestCase {
/** @var \OCP\Comments\ICommentsManager|\PHPUnit_Framework_MockObject_MockObject */ /** @var \OCP\Comments\ICommentsManager|\PHPUnit_Framework_MockObject_MockObject */
protected $commentsManager; protected $commentsManager;

View File

@ -19,13 +19,13 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\Comments; namespace OCA\DAV\Tests\unit\Comments;
use OCA\DAV\Comments\EntityTypeCollection as EntityTypeCollectionImplementation; use OCA\DAV\Comments\EntityTypeCollection as EntityTypeCollectionImplementation;
use OCP\Comments\CommentsEntityEvent; use OCP\Comments\CommentsEntityEvent;
use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\EventDispatcher\EventDispatcher;
class RootCollection extends \Test\TestCase { class RootCollectionTest extends \Test\TestCase {
/** @var \OCP\Comments\ICommentsManager|\PHPUnit_Framework_MockObject_MockObject */ /** @var \OCP\Comments\ICommentsManager|\PHPUnit_Framework_MockObject_MockObject */
protected $commentsManager; protected $commentsManager;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace OCA\DAV\Tests\Unit\Connector; namespace OCA\DAV\Tests\unit\Connector;
use OCP\IRequest; use OCP\IRequest;
use OCP\ISession; use OCP\ISession;
@ -8,13 +8,13 @@ use OCP\Share\Exceptions\ShareNotFound;
use OCP\Share\IManager; use OCP\Share\IManager;
/** /**
* Class PublicAuth * Class PublicAuthTest
* *
* @group DB * @group DB
* *
* @package OCA\DAV\Tests\Unit\Connector * @package OCA\DAV\Tests\unit\Connector
*/ */
class PublicAuth extends \Test\TestCase { class PublicAuthTest extends \Test\TestCase {
/** @var ISession|\PHPUnit_Framework_MockObject_MockObject */ /** @var ISession|\PHPUnit_Framework_MockObject_MockObject */
private $session; private $session;

View File

@ -22,7 +22,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre; namespace OCA\DAV\Tests\unit\Connector\Sabre;
use OCP\IRequest; use OCP\IRequest;
use OCP\IUser; use OCP\IUser;
@ -31,12 +31,12 @@ use OCP\ISession;
use OC\User\Session; use OC\User\Session;
/** /**
* Class Auth * Class AuthTest
* *
* @package OCA\DAV\Connector\Sabre * @package OCA\DAV\Tests\unit\Connector\Sabre
* @group DB * @group DB
*/ */
class Auth extends TestCase { class AuthTest extends TestCase {
/** @var ISession */ /** @var ISession */
private $session; private $session;
/** @var \OCA\DAV\Connector\Sabre\Auth */ /** @var \OCA\DAV\Connector\Sabre\Auth */

View File

@ -20,7 +20,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre; namespace OCA\DAV\Tests\unit\Connector\Sabre;
use OCA\DAV\Connector\Sabre\BlockLegacyClientPlugin; use OCA\DAV\Connector\Sabre\BlockLegacyClientPlugin;
use Test\TestCase; use Test\TestCase;
@ -29,7 +29,7 @@ use OCP\IConfig;
/** /**
* Class BlockLegacyClientPluginTest * Class BlockLegacyClientPluginTest
* *
* @package Test\Connector\Sabre * @package OCA\DAV\Tests\unit\Connector\Sabre
*/ */
class BlockLegacyClientPluginTest extends TestCase { class BlockLegacyClientPluginTest extends TestCase {
/** @var IConfig */ /** @var IConfig */

View File

@ -19,11 +19,11 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre; namespace OCA\DAV\Tests\unit\Connector\Sabre;
use \OCA\DAV\Connector\Sabre\CommentPropertiesPlugin as CommentPropertiesPluginImplementation; use \OCA\DAV\Connector\Sabre\CommentPropertiesPlugin as CommentPropertiesPluginImplementation;
class CommentsPropertiesPlugin extends \Test\TestCase { class CommentsPropertiesPluginTest extends \Test\TestCase {
/** @var CommentPropertiesPluginImplementation */ /** @var CommentPropertiesPluginImplementation */
protected $plugin; protected $plugin;

View File

@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/> * along with this program. If not, see <http://www.gnu.org/licenses/>
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre; namespace OCA\DAV\Tests\unit\Connector\Sabre;
/** /**
* Copyright (c) 2015 Vincent Petry <pvince81@owncloud.com> * Copyright (c) 2015 Vincent Petry <pvince81@owncloud.com>
@ -27,7 +27,7 @@ namespace OCA\DAV\Tests\Unit\Connector\Sabre;
* later. * later.
* See the COPYING-README file. * See the COPYING-README file.
*/ */
class CopyEtagPluginTest extends \Test\TestCase { class CopyEtagHeaderPluginTest extends \Test\TestCase {
/** /**
* @var \OCA\DAV\Connector\Sabre\CopyEtagHeaderPlugin * @var \OCA\DAV\Connector\Sabre\CopyEtagHeaderPlugin

View File

@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/> * along with this program. If not, see <http://www.gnu.org/licenses/>
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre; namespace OCA\DAV\Tests\unit\Connector\Sabre;
/** /**
* Copyright (c) 2015 Vincent Petry <pvince81@owncloud.com> * Copyright (c) 2015 Vincent Petry <pvince81@owncloud.com>
@ -33,9 +33,9 @@ namespace OCA\DAV\Tests\Unit\Connector\Sabre;
* *
* @group DB * @group DB
* *
* @package Tests\Connector\Sabre * @package OCA\DAV\Tests\unit\Connector\Sabre
*/ */
class CustomPropertiesBackend extends \Test\TestCase { class CustomPropertiesBackendTest extends \Test\TestCase {
/** /**
* @var \Sabre\DAV\Server * @var \Sabre\DAV\Server

View File

@ -26,7 +26,10 @@ namespace OCA\DAV\Tests\Unit\Connector\Sabre;
use OCP\Files\ForbiddenException; use OCP\Files\ForbiddenException;
class Directory extends \Test\TestCase { /**
* @group DB
*/
class DirectoryTest extends \Test\TestCase {
/** @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject */ /** @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject */
private $view; private $view;

View File

@ -20,7 +20,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre; namespace OCA\DAV\Tests\unit\Connector\Sabre;
use OCA\DAV\Connector\Sabre\DummyGetResponsePlugin; use OCA\DAV\Connector\Sabre\DummyGetResponsePlugin;
use Test\TestCase; use Test\TestCase;
@ -28,7 +28,7 @@ use Test\TestCase;
/** /**
* Class DummyGetResponsePluginTest * Class DummyGetResponsePluginTest
* *
* @package Test\Connector\Sabre * @package OCA\DAV\Tests\unit\Connector\Sabre
*/ */
class DummyGetResponsePluginTest extends TestCase { class DummyGetResponsePluginTest extends TestCase {
/** @var DummyGetResponsePlugin */ /** @var DummyGetResponsePlugin */

View File

@ -19,7 +19,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre\Exception; namespace OCA\DAV\Tests\unit\Connector\Sabre\Exception;
use OCA\DAV\Connector\Sabre\Exception\Forbidden; use OCA\DAV\Connector\Sabre\Exception\Forbidden;

View File

@ -20,7 +20,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre\Exception; namespace OCA\DAV\Tests\unit\Connector\Sabre\Exception;
use OCA\DAV\Connector\Sabre\Exception\InvalidPath; use OCA\DAV\Connector\Sabre\Exception\InvalidPath;

View File

@ -19,7 +19,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre; namespace OCA\DAV\Tests\unit\Connector\Sabre;
use OCA\DAV\Connector\Sabre\Exception\InvalidPath; use OCA\DAV\Connector\Sabre\Exception\InvalidPath;
use OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin as PluginToTest; use OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin as PluginToTest;
@ -44,7 +44,7 @@ class TestLogger extends Log {
} }
} }
class ExceptionLoggerPlugin extends TestCase { class ExceptionLoggerPluginTest extends TestCase {
/** @var Server */ /** @var Server */
private $server; private $server;

View File

@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/> * along with this program. If not, see <http://www.gnu.org/licenses/>
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre; namespace OCA\DAV\Tests\unit\Connector\Sabre;
use OCA\DAV\Connector\Sabre\FakeLockerPlugin; use OCA\DAV\Connector\Sabre\FakeLockerPlugin;
use Sabre\HTTP\Response; use Sabre\HTTP\Response;
@ -28,7 +28,7 @@ use Test\TestCase;
/** /**
* Class FakeLockerPluginTest * Class FakeLockerPluginTest
* *
* @package OCA\DAV\Tests\Unit\Connector\Sabre * @package OCA\DAV\Tests\unit\Connector\Sabre
*/ */
class FakeLockerPluginTest extends TestCase { class FakeLockerPluginTest extends TestCase {
/** @var FakeLockerPlugin */ /** @var FakeLockerPlugin */

View File

@ -22,7 +22,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre; namespace OCA\DAV\Tests\unit\Connector\Sabre;
use OC\Files\Storage\Local; use OC\Files\Storage\Local;
use OCP\Files\ForbiddenException; use OCP\Files\ForbiddenException;
@ -35,9 +35,9 @@ use OCP\Lock\ILockingProvider;
* *
* @group DB * @group DB
* *
* @package Test\Connector\Sabre * @package OCA\DAV\Tests\unit\Connector\Sabre
*/ */
class File extends \Test\TestCase { class FileTest extends \Test\TestCase {
/** /**
* @var string * @var string

View File

@ -20,7 +20,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/> * along with this program. If not, see <http://www.gnu.org/licenses/>
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre; namespace OCA\DAV\Tests\unit\Connector\Sabre;
use OCP\Files\StorageNotAvailableException; use OCP\Files\StorageNotAvailableException;
use Sabre\DAV\PropFind; use Sabre\DAV\PropFind;
@ -33,7 +33,7 @@ use Test\TestCase;
* later. * later.
* See the COPYING-README file. * See the COPYING-README file.
*/ */
class FilesPlugin extends TestCase { class FilesPluginTest extends TestCase {
const GETETAG_PROPERTYNAME = \OCA\DAV\Connector\Sabre\FilesPlugin::GETETAG_PROPERTYNAME; const GETETAG_PROPERTYNAME = \OCA\DAV\Connector\Sabre\FilesPlugin::GETETAG_PROPERTYNAME;
const FILEID_PROPERTYNAME = \OCA\DAV\Connector\Sabre\FilesPlugin::FILEID_PROPERTYNAME; const FILEID_PROPERTYNAME = \OCA\DAV\Connector\Sabre\FilesPlugin::FILEID_PROPERTYNAME;
const INTERNAL_FILEID_PROPERTYNAME = \OCA\DAV\Connector\Sabre\FilesPlugin::INTERNAL_FILEID_PROPERTYNAME; const INTERNAL_FILEID_PROPERTYNAME = \OCA\DAV\Connector\Sabre\FilesPlugin::INTERNAL_FILEID_PROPERTYNAME;

View File

@ -20,7 +20,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre; namespace OCA\DAV\Tests\unit\Connector\Sabre;
use OCA\DAV\Connector\Sabre\FilesReportPlugin as FilesReportPluginImplementation; use OCA\DAV\Connector\Sabre\FilesReportPlugin as FilesReportPluginImplementation;
use Sabre\DAV\Exception\NotFound; use Sabre\DAV\Exception\NotFound;
@ -30,7 +30,7 @@ use OCP\Files\Folder;
use OCP\IGroupManager; use OCP\IGroupManager;
use OCP\SystemTag\ISystemTagManager; use OCP\SystemTag\ISystemTagManager;
class FilesReportPlugin extends \Test\TestCase { class FilesReportPluginTest extends \Test\TestCase {
/** @var \Sabre\DAV\Server|\PHPUnit_Framework_MockObject_MockObject */ /** @var \Sabre\DAV\Server|\PHPUnit_Framework_MockObject_MockObject */
private $server; private $server;

View File

@ -19,7 +19,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre; namespace OCA\DAV\Tests\unit\Connector\Sabre;
use OCA\DAV\Connector\Sabre\MaintenancePlugin; use OCA\DAV\Connector\Sabre\MaintenancePlugin;
use Test\TestCase; use Test\TestCase;
@ -28,7 +28,7 @@ use OCP\IConfig;
/** /**
* Class MaintenancePluginTest * Class MaintenancePluginTest
* *
* @package Test\Connector\Sabre * @package OCA\DAV\Tests\unit\Connector\Sabre
*/ */
class MaintenancePluginTest extends TestCase { class MaintenancePluginTest extends TestCase {
/** @var IConfig */ /** @var IConfig */

View File

@ -21,15 +21,15 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre; namespace OCA\DAV\Tests\unit\Connector\Sabre;
/** /**
* Class Node * Class NodeTest
* *
* @group DB * @group DB
* @package OCA\DAV\Tests\Unit\Connector\Sabre * @package OCA\DAV\Tests\unit\Connector\Sabre
*/ */
class Node extends \Test\TestCase { class NodeTest extends \Test\TestCase {
public function davPermissionsProvider() { public function davPermissionsProvider() {
return array( return array(
array(\OCP\Constants::PERMISSION_ALL, 'file', false, false, 'RDNVW'), array(\OCP\Constants::PERMISSION_ALL, 'file', false, false, 'RDNVW'),

View File

@ -23,7 +23,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre; namespace OCA\DAV\Tests\unit\Connector\Sabre;
use OC\Files\FileInfo; use OC\Files\FileInfo;
@ -59,13 +59,13 @@ class TestDoubleFileView extends \OC\Files\View {
} }
/** /**
* Class ObjectTree * Class ObjectTreeTest
* *
* @group DB * @group DB
* *
* @package OCA\DAV\Tests\Unit\Connector\Sabre * @package OCA\DAV\Tests\Unit\Connector\Sabre
*/ */
class ObjectTree extends \Test\TestCase { class ObjectTreeTest extends \Test\TestCase {
/** /**
* @dataProvider moveFailedProvider * @dataProvider moveFailedProvider

View File

@ -21,14 +21,14 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre; namespace OCA\DAV\Tests\unit\Connector\Sabre;
use OCP\IGroupManager; use OCP\IGroupManager;
use \Sabre\DAV\PropPatch; use \Sabre\DAV\PropPatch;
use OCP\IUserManager; use OCP\IUserManager;
use Test\TestCase; use Test\TestCase;
class Principal extends TestCase { class PrincipalTest extends TestCase {
/** @var IUserManager | \PHPUnit_Framework_MockObject_MockObject */ /** @var IUserManager | \PHPUnit_Framework_MockObject_MockObject */
private $userManager; private $userManager;
/** @var \OCA\DAV\Connector\Sabre\Principal */ /** @var \OCA\DAV\Connector\Sabre\Principal */

View File

@ -20,14 +20,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/> * along with this program. If not, see <http://www.gnu.org/licenses/>
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre; namespace OCA\DAV\Tests\unit\Connector\Sabre;
/** /**
* Copyright (c) 2013 Thomas Müller <thomas.mueller@tmit.eu> * Copyright (c) 2013 Thomas Müller <thomas.mueller@tmit.eu>
* This file is licensed under the Affero General Public License version 3 or * This file is licensed under the Affero General Public License version 3 or
* later. * later.
* See the COPYING-README file. * See the COPYING-README file.
*/ */
class QuotaPlugin extends \Test\TestCase { class QuotaPluginTest extends \Test\TestCase {
/** /**
* @var \Sabre\DAV\Server * @var \Sabre\DAV\Server

View File

@ -20,7 +20,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest; namespace OCA\DAV\Tests\unit\Connector\Sabre\RequestTest;
use Sabre\DAV\Auth\Backend\BackendInterface; use Sabre\DAV\Auth\Backend\BackendInterface;
use Sabre\HTTP\RequestInterface; use Sabre\HTTP\RequestInterface;

View File

@ -20,7 +20,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest; namespace OCA\DAV\Tests\unit\Connector\Sabre\RequestTest;
use OCP\AppFramework\Http; use OCP\AppFramework\Http;
use OCP\Lock\ILockingProvider; use OCP\Lock\ILockingProvider;
@ -30,7 +30,7 @@ use OCP\Lock\ILockingProvider;
* *
* @group DB * @group DB
* *
* @package OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest * @package OCA\DAV\Tests\unit\Connector\Sabre\RequestTest
*/ */
class DownloadTest extends RequestTest { class DownloadTest extends RequestTest {
public function testDownload() { public function testDownload() {

View File

@ -20,7 +20,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest; namespace OCA\DAV\Tests\unit\Connector\Sabre\RequestTest;
use OC\Files\View; use OC\Files\View;
use Test\Traits\EncryptionTrait; use Test\Traits\EncryptionTrait;

View File

@ -20,7 +20,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest; namespace OCA\DAV\Tests\unit\Connector\Sabre\RequestTest;
use Sabre\DAV\Exception; use Sabre\DAV\Exception;

View File

@ -20,19 +20,19 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest; namespace OCA\DAV\Tests\unit\Connector\Sabre\RequestTest;
use OC\Files\View; use OC\Files\View;
use Test\Traits\EncryptionTrait; use Test\Traits\EncryptionTrait;
/** /**
* Class EncryptionUploadTest * Class PartFileInRootUploadTest
* *
* @group DB * @group DB
* *
* @package OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest * @package OCA\DAV\Tests\unit\Connector\Sabre\RequestTest
*/ */
class PartFileInRootUpload extends UploadTest { class PartFileInRootUploadTest extends UploadTest {
protected function setUp() { protected function setUp() {
$config = \OC::$server->getConfig(); $config = \OC::$server->getConfig();
$mockConfig = $this->getMock('\OCP\IConfig'); $mockConfig = $this->getMock('\OCP\IConfig');

View File

@ -22,7 +22,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest; namespace OCA\DAV\Tests\unit\Connector\Sabre\RequestTest;
use OCA\DAV\Connector\Sabre\Server; use OCA\DAV\Connector\Sabre\Server;
use OCA\DAV\Connector\Sabre\ServerFactory; use OCA\DAV\Connector\Sabre\ServerFactory;

View File

@ -20,7 +20,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest; namespace OCA\DAV\Tests\unit\Connector\Sabre\RequestTest;
use Sabre\HTTP\Request; use Sabre\HTTP\Request;
use Sabre\HTTP\Response; use Sabre\HTTP\Response;

View File

@ -20,7 +20,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest; namespace OCA\DAV\Tests\unit\Connector\Sabre\RequestTest;
use OC\Connector\Sabre\Exception\FileLocked; use OC\Connector\Sabre\Exception\FileLocked;
use OCP\AppFramework\Http; use OCP\AppFramework\Http;
@ -31,7 +31,7 @@ use OCP\Lock\ILockingProvider;
* *
* @group DB * @group DB
* *
* @package OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest * @package OCA\DAV\Tests\unit\Connector\Sabre\RequestTest
*/ */
class UploadTest extends RequestTest { class UploadTest extends RequestTest {
public function testBasicUpload() { public function testBasicUpload() {

View File

@ -18,9 +18,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/> * along with this program. If not, see <http://www.gnu.org/licenses/>
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre; namespace OCA\DAV\Tests\unit\Connector\Sabre;
class SharesPlugin extends \Test\TestCase { class SharesPluginTest extends \Test\TestCase {
const SHARETYPES_PROPERTYNAME = \OCA\DAV\Connector\Sabre\SharesPlugin::SHARETYPES_PROPERTYNAME; const SHARETYPES_PROPERTYNAME = \OCA\DAV\Connector\Sabre\SharesPlugin::SHARETYPES_PROPERTYNAME;

View File

@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/> * along with this program. If not, see <http://www.gnu.org/licenses/>
* *
*/ */
namespace OCA\DAV\Tests\Unit\Connector\Sabre; namespace OCA\DAV\Tests\unit\Connector\Sabre;
/** /**
* Copyright (c) 2014 Vincent Petry <pvince81@owncloud.com> * Copyright (c) 2014 Vincent Petry <pvince81@owncloud.com>
@ -27,7 +27,7 @@ namespace OCA\DAV\Tests\Unit\Connector\Sabre;
* later. * later.
* See the COPYING-README file. * See the COPYING-README file.
*/ */
class TagsPlugin extends \Test\TestCase { class TagsPluginTest extends \Test\TestCase {
const TAGS_PROPERTYNAME = \OCA\DAV\Connector\Sabre\TagsPlugin::TAGS_PROPERTYNAME; const TAGS_PROPERTYNAME = \OCA\DAV\Connector\Sabre\TagsPlugin::TAGS_PROPERTYNAME;
const FAVORITE_PROPERTYNAME = \OCA\DAV\Connector\Sabre\TagsPlugin::FAVORITE_PROPERTYNAME; const FAVORITE_PROPERTYNAME = \OCA\DAV\Connector\Sabre\TagsPlugin::FAVORITE_PROPERTYNAME;

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/> * along with this program. If not, see <http://www.gnu.org/licenses/>
* *
*/ */
namespace OCA\DAV\Tests\Unit\DAV;
namespace OCA\DAV\Tests\unit\DAV;
use OCA\DAV\Files\BrowserErrorPagePlugin; use OCA\DAV\Files\BrowserErrorPagePlugin;
use PHPUnit_Framework_MockObject_MockObject; use PHPUnit_Framework_MockObject_MockObject;

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/> * along with this program. If not, see <http://www.gnu.org/licenses/>
* *
*/ */
namespace OCA\DAV\Tests\Unit\DAV;
namespace OCA\DAV\Tests\unit\DAV;
use OCA\DAV\DAV\GroupPrincipalBackend; use OCA\DAV\DAV\GroupPrincipalBackend;
use OCP\IGroupManager; use OCP\IGroupManager;

View File

@ -20,7 +20,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\DAV; namespace OCA\DAV\Tests\unit\DAV;
use OCA\DAV\CalDAV\BirthdayService; use OCA\DAV\CalDAV\BirthdayService;
use OCA\DAV\CalDAV\CalDavBackend; use OCA\DAV\CalDAV\CalDavBackend;

View File

@ -19,7 +19,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\DAV; namespace OCA\DAV\Tests\unit\DAV\Sharing;
use OCA\DAV\DAV\Sharing\IShareable; use OCA\DAV\DAV\Sharing\IShareable;

View File

@ -19,7 +19,7 @@
* *
*/ */
namespace OCA\DAV\Tests\DAV; namespace OCA\DAV\Tests\unit\DAV;
use OCA\DAV\DAV\SystemPrincipalBackend; use OCA\DAV\DAV\SystemPrincipalBackend;
use Test\TestCase; use Test\TestCase;

View File

@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/> * along with this program. If not, see <http://www.gnu.org/licenses/>
* *
*/ */
namespace OCA\DAV\Tests\Unit; namespace OCA\DAV\Tests\unit;
use OCA\DAV\Server; use OCA\DAV\Server;
use OCP\IRequest; use OCP\IRequest;
@ -40,4 +40,4 @@ class ServerTest extends \Test\TestCase {
$s = new Server($r, '/'); $s = new Server($r, '/');
$this->assertNotNull($s->server); $this->assertNotNull($s->server);
} }
} }

View File

@ -19,14 +19,14 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\SystemTag; namespace OCA\DAV\Tests\unit\SystemTag;
use Sabre\DAV\Exception\NotFound; use Sabre\DAV\Exception\NotFound;
use OC\SystemTag\SystemTag; use OC\SystemTag\SystemTag;
use OCP\SystemTag\TagNotFoundException; use OCP\SystemTag\TagNotFoundException;
use OCP\SystemTag\ISystemTag; use OCP\SystemTag\ISystemTag;
class SystemTagMappingNode extends \Test\TestCase { class SystemTagMappingNodeTest extends \Test\TestCase {
/** /**
* @var \OCP\SystemTag\ISystemTagManager * @var \OCP\SystemTag\ISystemTagManager

View File

@ -19,7 +19,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\SystemTag; namespace OCA\DAV\Tests\unit\SystemTag;
use Sabre\DAV\Exception\NotFound; use Sabre\DAV\Exception\NotFound;
use Sabre\DAV\Exception\MethodNotAllowed; use Sabre\DAV\Exception\MethodNotAllowed;
@ -30,7 +30,7 @@ use OCP\SystemTag\TagNotFoundException;
use OCP\SystemTag\TagAlreadyExistsException; use OCP\SystemTag\TagAlreadyExistsException;
use OCP\SystemTag\ISystemTag; use OCP\SystemTag\ISystemTag;
class SystemTagNode extends \Test\TestCase { class SystemTagNodeTest extends \Test\TestCase {
/** /**
* @var \OCP\SystemTag\ISystemTagManager * @var \OCP\SystemTag\ISystemTagManager

View File

@ -21,7 +21,7 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\SystemTag; namespace OCA\DAV\Tests\unit\SystemTag;
use OC\SystemTag\SystemTag; use OC\SystemTag\SystemTag;
use OCP\IGroupManager; use OCP\IGroupManager;
@ -30,7 +30,7 @@ use OCP\SystemTag\TagAlreadyExistsException;
use OCP\IUser; use OCP\IUser;
use OCP\SystemTag\ISystemTag; use OCP\SystemTag\ISystemTag;
class SystemTagPlugin extends \Test\TestCase { class SystemTagPluginTest extends \Test\TestCase {
const ID_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::ID_PROPERTYNAME; const ID_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::ID_PROPERTYNAME;
const DISPLAYNAME_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::DISPLAYNAME_PROPERTYNAME; const DISPLAYNAME_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::DISPLAYNAME_PROPERTYNAME;

View File

@ -19,13 +19,13 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\SystemTag; namespace OCA\DAV\Tests\unit\SystemTag;
use OC\SystemTag\SystemTag; use OC\SystemTag\SystemTag;
use OCP\SystemTag\TagNotFoundException; use OCP\SystemTag\TagNotFoundException;
class SystemTagsByIdCollection extends \Test\TestCase { class SystemTagsByIdCollectionTest extends \Test\TestCase {
/** /**
* @var \OCP\SystemTag\ISystemTagManager * @var \OCP\SystemTag\ISystemTagManager

View File

@ -19,13 +19,13 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\SystemTag; namespace OCA\DAV\Tests\unit\SystemTag;
use OC\SystemTag\SystemTag; use OC\SystemTag\SystemTag;
use OCP\SystemTag\TagNotFoundException; use OCP\SystemTag\TagNotFoundException;
class SystemTagsObjectMappingCollection extends \Test\TestCase { class SystemTagsObjectMappingCollectionTest extends \Test\TestCase {
/** /**
* @var \OCP\SystemTag\ISystemTagManager * @var \OCP\SystemTag\ISystemTagManager
@ -33,7 +33,7 @@ class SystemTagsObjectMappingCollection extends \Test\TestCase {
private $tagManager; private $tagManager;
/** /**
* @var \OCP\SystemTag\ISystemTagMapper * @var \OCP\SystemTag\ISystemTagObjectMapper
*/ */
private $tagMapper; private $tagMapper;

View File

@ -19,9 +19,9 @@
* *
*/ */
namespace OCA\DAV\Tests\Unit\SystemTag; namespace OCA\DAV\Tests\unit\SystemTag;
class SystemTagsObjectTypeCollection extends \Test\TestCase { class SystemTagsObjectTypeCollectionTest extends \Test\TestCase {
/** /**
* @var \OCA\DAV\SystemTag\SystemTagsObjectTypeCollection * @var \OCA\DAV\SystemTag\SystemTagsObjectTypeCollection
@ -34,7 +34,7 @@ class SystemTagsObjectTypeCollection extends \Test\TestCase {
private $tagManager; private $tagManager;
/** /**
* @var \OCP\SystemTag\ISystemTagMapper * @var \OCP\SystemTag\ISystemTagObjectMapper
*/ */
private $tagMapper; private $tagMapper;

View File

@ -1,6 +1,7 @@
<?php <?php
namespace OCA\DAV\Tests\unit\Upload;
class AssemblyStreamTest extends \PHPUnit_Framework_TestCase { class AssemblyStreamTest extends \Test\TestCase {
/** /**
* @dataProvider providesNodes() * @dataProvider providesNodes()

View File

@ -1,6 +1,8 @@
<?php <?php
class FutureFileTest extends \PHPUnit_Framework_TestCase { namespace OCA\DAV\Tests\unit\Upload;
class FutureFileTest extends \Test\TestCase {
public function testGetContentType() { public function testGetContentType() {
$f = $this->mockFutureFile(); $f = $this->mockFutureFile();

View File

@ -28,6 +28,8 @@ if(!class_exists('PHPUnit_Framework_TestCase')) {
require_once('PHPUnit/Autoload.php'); require_once('PHPUnit/Autoload.php');
} }
\OC::$composerAutoloader->addPsr4('Test\\', OC::$SERVERROOT . '/tests/lib/', true);
\OC_App::loadApp('dav'); \OC_App::loadApp('dav');
OC_Hook::clear(); OC_Hook::clear();

View File

@ -6,7 +6,7 @@
timeoutForLargeTests="900" timeoutForLargeTests="900"
> >
<testsuite name='unit'> <testsuite name='unit'>
<directory suffix='.php'>.</directory> <directory suffix='Test.php'>.</directory>
</testsuite> </testsuite>
<!-- filters for code coverage --> <!-- filters for code coverage -->
<filter> <filter>