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 OCP\Contacts\IManager;

View File

@ -18,7 +18,8 @@
* 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 DateTimeZone;
@ -37,7 +38,7 @@ use Test\TestCase;
*
* @group DB
*
* @package Tests\Connector\Sabre
* @package OCA\DAV\Tests\unit\CalDAV
*/
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\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 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;

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\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\CalDavBackend;

View File

@ -21,7 +21,8 @@
* 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 OCA\DAV\CardDAV\AddressBook;
@ -39,7 +40,7 @@ use Test\TestCase;
*
* @group DB
*
* @package OCA\DAV\Tests\Unit\CardDAV
* @package OCA\DAV\Tests\unit\CardDAV
*/
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\ContactsManager;

View File

@ -20,12 +20,12 @@
*
*/
namespace OCA\DAV\Tests\Unit;
namespace OCA\DAV\Tests\unit\CardDAV;
use OCA\DAV\CardDAV\Converter;
use Test\TestCase;
class ConverterTests extends TestCase {
class ConverterTest extends TestCase {
/**
* @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;

View File

@ -19,8 +19,11 @@
* 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\IUserManager;
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 OCP\Comments\IComment;
use OCP\Comments\MessageTooLongException;
class CommentsNode extends \Test\TestCase {
class CommentsNodeTest extends \Test\TestCase {
protected $commentsManager;
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 OCA\DAV\Comments\CommentsPlugin as CommentsPluginImplementation;
use OCP\Comments\IComment;
use Sabre\DAV\Exception\NotFound;
class CommentsPlugin extends \Test\TestCase {
class CommentsPluginTest extends \Test\TestCase {
/** @var \Sabre\DAV\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 */
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;
class EntityTypeCollection extends \Test\TestCase {
class EntityTypeCollectionTest extends \Test\TestCase {
/** @var \OCP\Comments\ICommentsManager|\PHPUnit_Framework_MockObject_MockObject */
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 OCP\Comments\CommentsEntityEvent;
use Symfony\Component\EventDispatcher\EventDispatcher;
class RootCollection extends \Test\TestCase {
class RootCollectionTest extends \Test\TestCase {
/** @var \OCP\Comments\ICommentsManager|\PHPUnit_Framework_MockObject_MockObject */
protected $commentsManager;

View File

@ -1,6 +1,6 @@
<?php
namespace OCA\DAV\Tests\Unit\Connector;
namespace OCA\DAV\Tests\unit\Connector;
use OCP\IRequest;
use OCP\ISession;
@ -8,13 +8,13 @@ use OCP\Share\Exceptions\ShareNotFound;
use OCP\Share\IManager;
/**
* Class PublicAuth
* Class PublicAuthTest
*
* @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 */
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\IUser;
@ -31,12 +31,12 @@ use OCP\ISession;
use OC\User\Session;
/**
* Class Auth
* Class AuthTest
*
* @package OCA\DAV\Connector\Sabre
* @package OCA\DAV\Tests\unit\Connector\Sabre
* @group DB
*/
class Auth extends TestCase {
class AuthTest extends TestCase {
/** @var ISession */
private $session;
/** @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 Test\TestCase;
@ -29,7 +29,7 @@ use OCP\IConfig;
/**
* Class BlockLegacyClientPluginTest
*
* @package Test\Connector\Sabre
* @package OCA\DAV\Tests\unit\Connector\Sabre
*/
class BlockLegacyClientPluginTest extends TestCase {
/** @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;
class CommentsPropertiesPlugin extends \Test\TestCase {
class CommentsPropertiesPluginTest extends \Test\TestCase {
/** @var CommentPropertiesPluginImplementation */
protected $plugin;

View File

@ -19,7 +19,7 @@
* 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>
@ -27,7 +27,7 @@ namespace OCA\DAV\Tests\Unit\Connector\Sabre;
* later.
* See the COPYING-README file.
*/
class CopyEtagPluginTest extends \Test\TestCase {
class CopyEtagHeaderPluginTest extends \Test\TestCase {
/**
* @var \OCA\DAV\Connector\Sabre\CopyEtagHeaderPlugin

View File

@ -19,7 +19,7 @@
* 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>
@ -33,9 +33,9 @@ namespace OCA\DAV\Tests\Unit\Connector\Sabre;
*
* @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

View File

@ -26,7 +26,10 @@ namespace OCA\DAV\Tests\Unit\Connector\Sabre;
use OCP\Files\ForbiddenException;
class Directory extends \Test\TestCase {
/**
* @group DB
*/
class DirectoryTest extends \Test\TestCase {
/** @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject */
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 Test\TestCase;
@ -28,7 +28,7 @@ use Test\TestCase;
/**
* Class DummyGetResponsePluginTest
*
* @package Test\Connector\Sabre
* @package OCA\DAV\Tests\unit\Connector\Sabre
*/
class DummyGetResponsePluginTest extends TestCase {
/** @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;

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;

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\ExceptionLoggerPlugin as PluginToTest;
@ -44,7 +44,7 @@ class TestLogger extends Log {
}
}
class ExceptionLoggerPlugin extends TestCase {
class ExceptionLoggerPluginTest extends TestCase {
/** @var Server */
private $server;

View File

@ -19,7 +19,7 @@
* 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 Sabre\HTTP\Response;
@ -28,7 +28,7 @@ use Test\TestCase;
/**
* Class FakeLockerPluginTest
*
* @package OCA\DAV\Tests\Unit\Connector\Sabre
* @package OCA\DAV\Tests\unit\Connector\Sabre
*/
class FakeLockerPluginTest extends TestCase {
/** @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 OCP\Files\ForbiddenException;
@ -35,9 +35,9 @@ use OCP\Lock\ILockingProvider;
*
* @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

View File

@ -20,7 +20,7 @@
* 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 Sabre\DAV\PropFind;
@ -33,7 +33,7 @@ use Test\TestCase;
* later.
* See the COPYING-README file.
*/
class FilesPlugin extends TestCase {
class FilesPluginTest extends TestCase {
const GETETAG_PROPERTYNAME = \OCA\DAV\Connector\Sabre\FilesPlugin::GETETAG_PROPERTYNAME;
const FILEID_PROPERTYNAME = \OCA\DAV\Connector\Sabre\FilesPlugin::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 Sabre\DAV\Exception\NotFound;
@ -30,7 +30,7 @@ use OCP\Files\Folder;
use OCP\IGroupManager;
use OCP\SystemTag\ISystemTagManager;
class FilesReportPlugin extends \Test\TestCase {
class FilesReportPluginTest extends \Test\TestCase {
/** @var \Sabre\DAV\Server|\PHPUnit_Framework_MockObject_MockObject */
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 Test\TestCase;
@ -28,7 +28,7 @@ use OCP\IConfig;
/**
* Class MaintenancePluginTest
*
* @package Test\Connector\Sabre
* @package OCA\DAV\Tests\unit\Connector\Sabre
*/
class MaintenancePluginTest extends TestCase {
/** @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
* @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() {
return array(
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;
@ -59,13 +59,13 @@ class TestDoubleFileView extends \OC\Files\View {
}
/**
* Class ObjectTree
* Class ObjectTreeTest
*
* @group DB
*
* @package OCA\DAV\Tests\Unit\Connector\Sabre
*/
class ObjectTree extends \Test\TestCase {
class ObjectTreeTest extends \Test\TestCase {
/**
* @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 \Sabre\DAV\PropPatch;
use OCP\IUserManager;
use Test\TestCase;
class Principal extends TestCase {
class PrincipalTest extends TestCase {
/** @var IUserManager | \PHPUnit_Framework_MockObject_MockObject */
private $userManager;
/** @var \OCA\DAV\Connector\Sabre\Principal */

View File

@ -20,14 +20,14 @@
* 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>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
class QuotaPlugin extends \Test\TestCase {
class QuotaPluginTest extends \Test\TestCase {
/**
* @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\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\Lock\ILockingProvider;
@ -30,7 +30,7 @@ use OCP\Lock\ILockingProvider;
*
* @group DB
*
* @package OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest
* @package OCA\DAV\Tests\unit\Connector\Sabre\RequestTest
*/
class DownloadTest extends RequestTest {
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 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;

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 Test\Traits\EncryptionTrait;
/**
* Class EncryptionUploadTest
* Class PartFileInRootUploadTest
*
* @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() {
$config = \OC::$server->getConfig();
$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\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\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 OCP\AppFramework\Http;
@ -31,7 +31,7 @@ use OCP\Lock\ILockingProvider;
*
* @group DB
*
* @package OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest
* @package OCA\DAV\Tests\unit\Connector\Sabre\RequestTest
*/
class UploadTest extends RequestTest {
public function testBasicUpload() {

View File

@ -18,9 +18,9 @@
* 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;

View File

@ -19,7 +19,7 @@
* 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>
@ -27,7 +27,7 @@ namespace OCA\DAV\Tests\Unit\Connector\Sabre;
* later.
* 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 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/>
*
*/
namespace OCA\DAV\Tests\Unit\DAV;
namespace OCA\DAV\Tests\unit\DAV;
use OCA\DAV\Files\BrowserErrorPagePlugin;
use PHPUnit_Framework_MockObject_MockObject;

View File

@ -18,7 +18,8 @@
* 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 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\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;

View File

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

View File

@ -19,7 +19,7 @@
* 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 OCP\IRequest;

View File

@ -19,14 +19,14 @@
*
*/
namespace OCA\DAV\Tests\Unit\SystemTag;
namespace OCA\DAV\Tests\unit\SystemTag;
use Sabre\DAV\Exception\NotFound;
use OC\SystemTag\SystemTag;
use OCP\SystemTag\TagNotFoundException;
use OCP\SystemTag\ISystemTag;
class SystemTagMappingNode extends \Test\TestCase {
class SystemTagMappingNodeTest extends \Test\TestCase {
/**
* @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\MethodNotAllowed;
@ -30,7 +30,7 @@ use OCP\SystemTag\TagNotFoundException;
use OCP\SystemTag\TagAlreadyExistsException;
use OCP\SystemTag\ISystemTag;
class SystemTagNode extends \Test\TestCase {
class SystemTagNodeTest extends \Test\TestCase {
/**
* @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 OCP\IGroupManager;
@ -30,7 +30,7 @@ use OCP\SystemTag\TagAlreadyExistsException;
use OCP\IUser;
use OCP\SystemTag\ISystemTag;
class SystemTagPlugin extends \Test\TestCase {
class SystemTagPluginTest extends \Test\TestCase {
const ID_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::ID_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 OCP\SystemTag\TagNotFoundException;
class SystemTagsByIdCollection extends \Test\TestCase {
class SystemTagsByIdCollectionTest extends \Test\TestCase {
/**
* @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 OCP\SystemTag\TagNotFoundException;
class SystemTagsObjectMappingCollection extends \Test\TestCase {
class SystemTagsObjectMappingCollectionTest extends \Test\TestCase {
/**
* @var \OCP\SystemTag\ISystemTagManager
@ -33,7 +33,7 @@ class SystemTagsObjectMappingCollection extends \Test\TestCase {
private $tagManager;
/**
* @var \OCP\SystemTag\ISystemTagMapper
* @var \OCP\SystemTag\ISystemTagObjectMapper
*/
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
@ -34,7 +34,7 @@ class SystemTagsObjectTypeCollection extends \Test\TestCase {
private $tagManager;
/**
* @var \OCP\SystemTag\ISystemTagMapper
* @var \OCP\SystemTag\ISystemTagObjectMapper
*/
private $tagMapper;

View File

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

View File

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

View File

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

View File

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