summaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/unit
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/tests/unit')
-rw-r--r--apps/dav/tests/unit/AppInfo/ApplicationTest.php (renamed from apps/dav/tests/unit/appinfo/applicationtest.php)2
-rw-r--r--apps/dav/tests/unit/CalDAV/CalDavBackendTest.php (renamed from apps/dav/tests/unit/caldav/caldavbackendtest.php)5
-rw-r--r--apps/dav/tests/unit/CalDAV/CalendarTest.php (renamed from apps/dav/tests/unit/caldav/calendartest.php)2
-rw-r--r--apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php (renamed from apps/dav/tests/unit/caldav/schedule/imipplugintest.php)2
-rw-r--r--apps/dav/tests/unit/CardDAV/AddressBookImplTest.php (renamed from apps/dav/tests/unit/carddav/addressbookimpltest.php)2
-rw-r--r--apps/dav/tests/unit/CardDAV/AddressBookTest.php (renamed from apps/dav/tests/unit/carddav/addressbooktest.php)2
pre { line-height: 125%; } td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
<?php
/**
 * @copyright Copyright (c) 2016, ownCloud, Inc.
 *
 * @author AW-UC <git@a-wesemann.de>
 * @author Lukas Reschke <lukas@statuscode.ch>
 * @author Morris Jobke <hey@morrisjobke.de>
 * @author Robin McCorkell <robin@mccorkell.me.uk>
 * @author Thomas Müller <thomas.mueller@tmit.eu>
 * @author Vincent Petry <pvince81@owncloud.com>
 *
 * @license AGPL-3.0
 *
 * This code is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License, version 3,
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License, version 3,
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 *
 */

namespace OC;

use OCP\ILogger;

class NaturalSort {
	private static $instance;
	private $collator;
	private $cache = array();

	/**
	 * Instantiate a new \OC\NaturalSort instance.
	 * @param object $injectedCollator
	 */
	public function __construct($injectedCollator = null) {
		// inject an instance of \Collator('en_US') to force using the php5-intl Collator
		// or inject an instance of \OC\NaturalSort_DefaultCollator to force using Owncloud's default collator
		if (isset($injectedCollator)) {
			$this->collator = $injectedCollator;
			\OCP\Util::writeLog('core', 'forced use of '.get_class($injectedCollator), ILogger::DEBUG);
		}
	}

	/**
	 * Split the given string in chunks of numbers and strings
	 * @param string $t string
	 * @return array of strings and number chunks
	 */
	private function naturalSortChunkify($t) {
		// Adapted and ported to PHP from
		// http://my.opera.com/GreyWyvern/blog/show.dml/1671288
		if (isset($this->cache[$t])) {
			return $this->cache[$t];
		}
		$tz = array();
		$x = 0;
		$y = -1;
		$n = null;

		while (isset($t[$x])) {
			$c = $t[$x];
			// only include the dot in strings
			$m = ((!$n && $c === '.') || ($c >= '0' && $c <= '9'));
			if ($m !== $n) {
				// next chunk
				$y++;
				$tz[$y] = '';
				$n = $m;
			}
			$tz[$y] .= $c;
			$x++;
		}
		$this->cache[$t] = $tz;
		return $tz;
	}

	/**
	 * Returns the string collator
	 * @return \Collator string collator
	 */
	private function getCollator() {
		if (!isset($this->collator)) {
			// looks like the default is en_US_POSIX which yields wrong sorting with
			// German umlauts, so using en_US instead
			if (class_exists('Collator')) {
				$this->collator = new \Collator('en_US');
			}
			else {
				$this->collator = new \OC\NaturalSort_DefaultCollator();
			}
		}
		return $this->collator;
	}

	/**
	 * Compare two strings to provide a natural sort
	 * @param string $a first string to compare
	 * @param string $b second string to compare
	 * @return int -1 if $b comes before $a, 1 if $a comes before $b
	 * or 0 if the strings are identical
	 */
	public function compare($a, $b) {
		// Needed because PHP doesn't sort correctly when numbers are enclosed in
		// parenthesis, even with NUMERIC_COLLATION enabled.
		// For example it gave ["test (2).txt", "test.txt"]
		// instead of ["test.txt", "test (2).txt"]
		$aa = self::naturalSortChunkify($a);
		$bb = self::naturalSortChunkify($b);

		for ($x = 0; isset($aa[$x]) && isset($bb[$x]); $x++) {
			$aChunk = $aa[$x];
			$bChunk = $bb[$x];
			if ($aChunk !== $bChunk) {
				// test first character (character comparison, not number comparison)
				if ($aChunk[0] >= '0' && $aChunk[0] <= '9' && $bChunk[0] >= '0' && $bChunk[0] <= '9') {
					$aNum = (int)$aChunk;
					$bNum = (int)$bChunk;
					return $aNum - $bNum;
				}
				return self::getCollator()->compare($aChunk, $bChunk);
			}
		}
		return count($aa) - count($bb);
	}

	/**
	 * Returns a singleton
	 * @return \OC\NaturalSort instance
	 */
	public static function getInstance() {
		if (!isset(self::$instance)) {
			self::$instance = new \OC\NaturalSort();
		}
		return self::$instance;
	}
}
ass='rem' style='width: 50.0%;'/>
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/RequestTest/RequestTest.php (renamed from apps/dav/tests/unit/connector/sabre/requesttest/requesttest.php)2
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/RequestTest/Sapi.php (renamed from apps/dav/tests/unit/connector/sabre/requesttest/sapi.php)2
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/RequestTest/UploadTest.php (renamed from apps/dav/tests/unit/connector/sabre/requesttest/uploadtest.php)4
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php (renamed from apps/dav/tests/unit/connector/sabre/sharesplugin.php)4
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php (renamed from apps/dav/tests/unit/connector/sabre/tagsplugin.php)4
-rw-r--r--apps/dav/tests/unit/DAV/BrowserErrorPagePluginTest.php (renamed from apps/dav/tests/unit/dav/browsererrorpageplugintest.php)3
-rw-r--r--apps/dav/tests/unit/DAV/GroupPrincipalTest.php (renamed from apps/dav/tests/unit/dav/groupprincipaltest.php)3
-rw-r--r--apps/dav/tests/unit/DAV/HookManagerTest.php (renamed from apps/dav/tests/unit/dav/HookManagerTest.php)2
-rw-r--r--apps/dav/tests/unit/DAV/Sharing/PluginTest.php (renamed from apps/dav/tests/unit/dav/sharing/plugintest.php)2
-rw-r--r--apps/dav/tests/unit/DAV/SystemPrincipalBackendTest.php (renamed from apps/dav/tests/unit/dav/systemprincipalbackendtest.php)2
-rw-r--r--apps/dav/tests/unit/ServerTest.php (renamed from apps/dav/tests/unit/servertest.php)4
-rw-r--r--apps/dav/tests/unit/SystemTag/SystemTagMappingNodeTest.php (renamed from apps/dav/tests/unit/systemtag/systemtagmappingnode.php)4
-rw-r--r--apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php (renamed from apps/dav/tests/unit/systemtag/systemtagnode.php)4
-rw-r--r--apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php (renamed from apps/dav/tests/unit/systemtag/systemtagplugin.php)4
-rw-r--r--apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php (renamed from apps/dav/tests/unit/systemtag/systemtagsbyidcollection.php)4
-rw-r--r--apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php (renamed from apps/dav/tests/unit/systemtag/systemtagsobjectmappingcollection.php)6
-rw-r--r--apps/dav/tests/unit/SystemTag/SystemTagsObjectTypeCollectionTest.php (renamed from apps/dav/tests/unit/systemtag/systemtagsobjecttypecollection.php)6
-rw-r--r--apps/dav/tests/unit/Upload/AssemblyStreamTest.php (renamed from apps/dav/tests/unit/upload/assemblystreamtest.php)3
-rw-r--r--apps/dav/tests/unit/Upload/FutureFileTest.php (renamed from apps/dav/tests/unit/upload/futurefiletest.php)4
-rw-r--r--apps/dav/tests/unit/phpunit.xml2
62 files changed, 122 insertions, 112 deletions
diff --git a/apps/dav/tests/unit/appinfo/applicationtest.php b/apps/dav/tests/unit/AppInfo/ApplicationTest.php
index 05dd75b2c68..6b55fcaf966 100644
--- a/apps/dav/tests/unit/appinfo/applicationtest.php
+++ b/apps/dav/tests/unit/AppInfo/ApplicationTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/caldav/caldavbackendtest.php b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
index 89be5671ca8..0252457e737 100644
--- a/apps/dav/tests/unit/caldav/caldavbackendtest.php
+++ b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
@@ -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 {
diff --git a/apps/dav/tests/unit/caldav/calendartest.php b/apps/dav/tests/unit/CalDAV/CalendarTest.php
index f13edde6085..cfaa2d89016 100644
--- a/apps/dav/tests/unit/caldav/calendartest.php
+++ b/apps/dav/tests/unit/CalDAV/CalendarTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/caldav/schedule/imipplugintest.php b/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php
index fcbf4fde04c..addb585e41b 100644
--- a/apps/dav/tests/unit/caldav/schedule/imipplugintest.php
+++ b/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/carddav/addressbookimpltest.php b/apps/dav/tests/unit/CardDAV/AddressBookImplTest.php
index ba537a631be..25da92bbf23 100644
--- a/apps/dav/tests/unit/carddav/addressbookimpltest.php
+++ b/apps/dav/tests/unit/CardDAV/AddressBookImplTest.php
@@ -21,7 +21,7 @@
*/
-namespace OCA\DAV\Tests\Unit\CardDAV;
+namespace OCA\DAV\Tests\unit\CardDAV;
use OCA\DAV\CardDAV\AddressBook;
diff --git a/apps/dav/tests/unit/carddav/addressbooktest.php b/apps/dav/tests/unit/CardDAV/AddressBookTest.php
index c5cf7e5f7ba..7144c36140c 100644
--- a/apps/dav/tests/unit/carddav/addressbooktest.php
+++ b/apps/dav/tests/unit/CardDAV/AddressBookTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/carddav/birthdayservicetest.php b/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php
index e15edd16c62..0162924064d 100644
--- a/apps/dav/tests/unit/carddav/birthdayservicetest.php
+++ b/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/carddav/carddavbackendtest.php b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php
index 1ee09260c88..7cae76ae62b 100644
--- a/apps/dav/tests/unit/carddav/carddavbackendtest.php
+++ b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php
@@ -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 {
diff --git a/apps/dav/tests/unit/carddav/contactsmanagertest.php b/apps/dav/tests/unit/CardDAV/ContactsManagerTest.php
index 5a384550df5..775dc5d18a5 100644
--- a/apps/dav/tests/unit/carddav/contactsmanagertest.php
+++ b/apps/dav/tests/unit/CardDAV/ContactsManagerTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/carddav/convertertest.php b/apps/dav/tests/unit/CardDAV/ConverterTest.php
index ba71b75686a..4b71d43cc43 100644
--- a/apps/dav/tests/unit/carddav/convertertest.php
+++ b/apps/dav/tests/unit/CardDAV/ConverterTest.php
@@ -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
diff --git a/apps/dav/tests/unit/carddav/sharing/plugintest.php b/apps/dav/tests/unit/CardDAV/Sharing/PluginTest.php
index f7159c2d22d..1cbececdb33 100644
--- a/apps/dav/tests/unit/carddav/sharing/plugintest.php
+++ b/apps/dav/tests/unit/CardDAV/Sharing/PluginTest.php
@@ -19,7 +19,7 @@
*
*/
-namespace OCA\DAV\Tests\Unit\CardDAV;
+namespace OCA\DAV\Tests\unit\CardDAV\Sharing;
use OCA\DAV\DAV\Sharing\IShareable;
diff --git a/apps/dav/tests/unit/carddav/syncservicetest.php b/apps/dav/tests/unit/CardDAV/SyncServiceTest.php
index e3ffaf472ed..e5a2603c77a 100644
--- a/apps/dav/tests/unit/carddav/syncservicetest.php
+++ b/apps/dav/tests/unit/CardDAV/SyncServiceTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/comments/commentnode.php b/apps/dav/tests/unit/Comments/CommentsNodeTest.php
index 8ebc5c2ff2c..d812ad62cb1 100644
--- a/apps/dav/tests/unit/comments/commentnode.php
+++ b/apps/dav/tests/unit/Comments/CommentsNodeTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/comments/commentsplugin.php b/apps/dav/tests/unit/Comments/CommentsPluginTest.php
index c909f6a61ab..608717bd0af 100644
--- a/apps/dav/tests/unit/comments/commentsplugin.php
+++ b/apps/dav/tests/unit/Comments/CommentsPluginTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/comments/entitycollection.php b/apps/dav/tests/unit/Comments/EntityCollectionTest.php
index bc009e92549..157d58c9eca 100644
--- a/apps/dav/tests/unit/comments/entitycollection.php
+++ b/apps/dav/tests/unit/Comments/EntityCollectionTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/comments/entitytypecollection.php b/apps/dav/tests/unit/Comments/EntityTypeCollectionTest.php
index 96b1cad8373..51db44380fa 100644
--- a/apps/dav/tests/unit/comments/entitytypecollection.php
+++ b/apps/dav/tests/unit/Comments/EntityTypeCollectionTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/comments/rootcollection.php b/apps/dav/tests/unit/Comments/RootCollectionTest.php
index a59482fba73..8f3b83e4264 100644
--- a/apps/dav/tests/unit/comments/rootcollection.php
+++ b/apps/dav/tests/unit/Comments/RootCollectionTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/connector/publicauth.php b/apps/dav/tests/unit/Connector/PublicAuthTest.php
index 76a6e1ac6a1..f8d6e1b5d12 100644
--- a/apps/dav/tests/unit/connector/publicauth.php
+++ b/apps/dav/tests/unit/Connector/PublicAuthTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/connector/sabre/auth.php b/apps/dav/tests/unit/Connector/Sabre/AuthTest.php
index d3f697ba8e6..1c29d2dbd6f 100644
--- a/apps/dav/tests/unit/connector/sabre/auth.php
+++ b/apps/dav/tests/unit/Connector/Sabre/AuthTest.php
@@ -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 */
diff --git a/apps/dav/tests/unit/connector/sabre/BlockLegacyClientPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php
index d02064531ab..00378fd4139 100644
--- a/apps/dav/tests/unit/connector/sabre/BlockLegacyClientPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php
@@ -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 */
diff --git a/apps/dav/tests/unit/connector/sabre/commentpropertiesplugin.php b/apps/dav/tests/unit/Connector/Sabre/CommentsPropertiesPluginTest.php
index f7f87e01544..d98c2228ebd 100644
--- a/apps/dav/tests/unit/connector/sabre/commentpropertiesplugin.php
+++ b/apps/dav/tests/unit/Connector/Sabre/CommentsPropertiesPluginTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/connector/sabre/copyetagheaderplugintest.php b/apps/dav/tests/unit/Connector/Sabre/CopyEtagHeaderPluginTest.php
index 7f6fb26e4d1..b8695e0a5d5 100644
--- a/apps/dav/tests/unit/connector/sabre/copyetagheaderplugintest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/CopyEtagHeaderPluginTest.php
@@ -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
diff --git a/apps/dav/tests/unit/connector/sabre/custompropertiesbackend.php b/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php
index e0ba61e9134..0ae6bb014ad 100644
--- a/apps/dav/tests/unit/connector/sabre/custompropertiesbackend.php
+++ b/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php
@@ -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
diff --git a/apps/dav/tests/unit/connector/sabre/directory.php b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php
index e25a82c4876..66f0a803807 100644
--- a/apps/dav/tests/unit/connector/sabre/directory.php
+++ b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php
@@ -29,7 +29,7 @@ use OCP\Files\ForbiddenException;
/**
* @group DB
*/
-class Directory extends \Test\TestCase {
+class DirectoryTest extends \Test\TestCase {
/** @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject */
private $view;
diff --git a/apps/dav/tests/unit/connector/sabre/DummyGetResponsePluginTest.php b/apps/dav/tests/unit/Connector/Sabre/DummyGetResponsePluginTest.php
index 0ead617f461..125cb174c58 100644
--- a/apps/dav/tests/unit/connector/sabre/DummyGetResponsePluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/DummyGetResponsePluginTest.php
@@ -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 */
diff --git a/apps/dav/tests/unit/connector/sabre/exception/forbiddentest.php b/apps/dav/tests/unit/Connector/Sabre/Exception/ForbiddenTest.php
index 36ea97df9f7..44e9e17b695 100644
--- a/apps/dav/tests/unit/connector/sabre/exception/forbiddentest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/Exception/ForbiddenTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/connector/sabre/exception/invalidpathtest.php b/apps/dav/tests/unit/Connector/Sabre/Exception/InvalidPathTest.php
index 431a0484d65..0e1224f596a 100644
--- a/apps/dav/tests/unit/connector/sabre/exception/invalidpathtest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/Exception/InvalidPathTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/connector/sabre/exceptionloggerplugin.php b/apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php
index b76285be336..f6102fa4e9b 100644
--- a/apps/dav/tests/unit/connector/sabre/exceptionloggerplugin.php
+++ b/apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/connector/sabre/FakeLockerPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FakeLockerPluginTest.php
index 30d2bf41810..98edfb3c5b4 100644
--- a/apps/dav/tests/unit/connector/sabre/FakeLockerPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/FakeLockerPluginTest.php
@@ -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 */
diff --git a/apps/dav/tests/unit/connector/sabre/file.php b/apps/dav/tests/unit/Connector/Sabre/FileTest.php
index eab7ece159c..0f404a6a16c 100644
--- a/apps/dav/tests/unit/connector/sabre/file.php
+++ b/apps/dav/tests/unit/Connector/Sabre/FileTest.php
@@ -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
diff --git a/apps/dav/tests/unit/connector/sabre/filesplugin.php b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php
index fb5d658b39c..5a944e74fca 100644
--- a/apps/dav/tests/unit/connector/sabre/filesplugin.php
+++ b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/connector/sabre/filesreportplugin.php b/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php
index ffe1a19ee56..d5bbbbcc99d 100644
--- a/apps/dav/tests/unit/connector/sabre/filesreportplugin.php
+++ b/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/connector/sabre/MaintenancePluginTest.php b/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php
index dea1e64db1d..a95dcd69f44 100644
--- a/apps/dav/tests/unit/connector/sabre/MaintenancePluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php
@@ -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 */
diff --git a/apps/dav/tests/unit/connector/sabre/node.php b/apps/dav/tests/unit/Connector/Sabre/NodeTest.php
index f70d1ee3faf..deb6ecf7f70 100644
--- a/apps/dav/tests/unit/connector/sabre/node.php
+++ b/apps/dav/tests/unit/Connector/Sabre/NodeTest.php
@@ -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'),
diff --git a/apps/dav/tests/unit/connector/sabre/objecttree.php b/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php
index e5e858ef17b..4a5e43376c0 100644
--- a/apps/dav/tests/unit/connector/sabre/objecttree.php
+++ b/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php
@@ -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
diff --git a/apps/dav/tests/unit/connector/sabre/principal.php b/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php
index 75076e9618b..63717713a7c 100644
--- a/apps/dav/tests/unit/connector/sabre/principal.php
+++ b/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php
@@ -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 */
diff --git a/apps/dav/tests/unit/connector/sabre/quotaplugin.php b/apps/dav/tests/unit/Connector/Sabre/QuotaPluginTest.php
index b5a8bfef31c..45fb1743d15 100644
--- a/apps/dav/tests/unit/connector/sabre/quotaplugin.php
+++ b/apps/dav/tests/unit/Connector/Sabre/QuotaPluginTest.php
@@ -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
diff --git a/apps/dav/tests/unit/connector/sabre/requesttest/auth.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/Auth.php
index b728a8f3bd8..a8fcf552849 100644
--- a/apps/dav/tests/unit/connector/sabre/requesttest/auth.php
+++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/Auth.php
@@ -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;
diff --git a/apps/dav/tests/unit/connector/sabre/requesttest/downloadtest.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/DownloadTest.php
index 3d047399a1f..1b296aaa243 100644
--- a/apps/dav/tests/unit/connector/sabre/requesttest/downloadtest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/DownloadTest.php
@@ -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() {
diff --git a/apps/dav/tests/unit/connector/sabre/requesttest/encryptionuploadtest.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/EncryptionUploadTest.php
index c5c6d0da0c2..1a593cb8d76 100644
--- a/apps/dav/tests/unit/connector/sabre/requesttest/encryptionuploadtest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/EncryptionUploadTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/connector/sabre/requesttest/exceptionplugin.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/ExceptionPlugin.php
index a6a0f9d3b86..42b8ef927f0 100644
--- a/apps/dav/tests/unit/connector/sabre/requesttest/exceptionplugin.php
+++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/ExceptionPlugin.php
@@ -20,7 +20,7 @@
*
*/
-namespace OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest;
+namespace OCA\DAV\Tests\unit\Connector\Sabre\RequestTest;
use Sabre\DAV\Exception;
diff --git a/apps/dav/tests/unit/connector/sabre/requesttest/partfileinrootupload.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/PartFileInRootUploadTest.php
index 52790c5b00b..2986db4a7f1 100644
--- a/apps/dav/tests/unit/connector/sabre/requesttest/partfileinrootupload.php
+++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/PartFileInRootUploadTest.php
@@ -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');
diff --git a/apps/dav/tests/unit/connector/sabre/requesttest/requesttest.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/RequestTest.php
index e3cdca5abfa..1c951a2fbd0 100644
--- a/apps/dav/tests/unit/connector/sabre/requesttest/requesttest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/RequestTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/connector/sabre/requesttest/sapi.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/Sapi.php
index 6407d9bc28b..0f11ded89e0 100644
--- a/apps/dav/tests/unit/connector/sabre/requesttest/sapi.php
+++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/Sapi.php
@@ -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;
diff --git a/apps/dav/tests/unit/connector/sabre/requesttest/uploadtest.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/UploadTest.php
index ae30268e366..efb499b69c3 100644
--- a/apps/dav/tests/unit/connector/sabre/requesttest/uploadtest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/UploadTest.php
@@ -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() {
diff --git a/apps/dav/tests/unit/connector/sabre/sharesplugin.php b/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php
index 42f1b539916..ff1f59e7851 100644
--- a/apps/dav/tests/unit/connector/sabre/sharesplugin.php
+++ b/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/connector/sabre/tagsplugin.php b/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php
index 95ba002e393..e48d9b3aa5f 100644
--- a/apps/dav/tests/unit/connector/sabre/tagsplugin.php
+++ b/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/dav/browsererrorpageplugintest.php b/apps/dav/tests/unit/DAV/BrowserErrorPagePluginTest.php
index aeae0e1b152..c2ffd91ba31 100644
--- a/apps/dav/tests/unit/dav/browsererrorpageplugintest.php
+++ b/apps/dav/tests/unit/DAV/BrowserErrorPagePluginTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/dav/groupprincipaltest.php b/apps/dav/tests/unit/DAV/GroupPrincipalTest.php
index 9d012639310..7bfb89609e4 100644
--- a/apps/dav/tests/unit/dav/groupprincipaltest.php
+++ b/apps/dav/tests/unit/DAV/GroupPrincipalTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/dav/HookManagerTest.php b/apps/dav/tests/unit/DAV/HookManagerTest.php
index 5c36d0d785c..25eb3b8c11c 100644
--- a/apps/dav/tests/unit/dav/HookManagerTest.php
+++ b/apps/dav/tests/unit/DAV/HookManagerTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/dav/sharing/plugintest.php b/apps/dav/tests/unit/DAV/Sharing/PluginTest.php
index ce6c96f1bfc..eccb59923f1 100644
--- a/apps/dav/tests/unit/dav/sharing/plugintest.php
+++ b/apps/dav/tests/unit/DAV/Sharing/PluginTest.php
@@ -19,7 +19,7 @@
*
*/
-namespace OCA\DAV\Tests\Unit\DAV;
+namespace OCA\DAV\Tests\unit\DAV\Sharing;
use OCA\DAV\DAV\Sharing\IShareable;
diff --git a/apps/dav/tests/unit/dav/systemprincipalbackendtest.php b/apps/dav/tests/unit/DAV/SystemPrincipalBackendTest.php
index 26717f7509b..a09b24fa8d9 100644
--- a/apps/dav/tests/unit/dav/systemprincipalbackendtest.php
+++ b/apps/dav/tests/unit/DAV/SystemPrincipalBackendTest.php
@@ -19,7 +19,7 @@
*
*/
-namespace OCA\DAV\Tests\DAV;
+namespace OCA\DAV\Tests\unit\DAV;
use OCA\DAV\DAV\SystemPrincipalBackend;
use Test\TestCase;
diff --git a/apps/dav/tests/unit/servertest.php b/apps/dav/tests/unit/ServerTest.php
index b25da3cc807..f52585ad203 100644
--- a/apps/dav/tests/unit/servertest.php
+++ b/apps/dav/tests/unit/ServerTest.php
@@ -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;
@@ -40,4 +40,4 @@ class ServerTest extends \Test\TestCase {
$s = new Server($r, '/');
$this->assertNotNull($s->server);
}
-} \ No newline at end of file
+}
diff --git a/apps/dav/tests/unit/systemtag/systemtagmappingnode.php b/apps/dav/tests/unit/SystemTag/SystemTagMappingNodeTest.php
index f0e1c3bc567..28f8c93a611 100644
--- a/apps/dav/tests/unit/systemtag/systemtagmappingnode.php
+++ b/apps/dav/tests/unit/SystemTag/SystemTagMappingNodeTest.php
@@ -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
diff --git a/apps/dav/tests/unit/systemtag/systemtagnode.php b/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php
index d9e088a7d90..ff5f6d1aa02 100644
--- a/apps/dav/tests/unit/systemtag/systemtagnode.php
+++ b/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php
@@ -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
diff --git a/apps/dav/tests/unit/systemtag/systemtagplugin.php b/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php
index da82bc8904a..154aa619866 100644
--- a/apps/dav/tests/unit/systemtag/systemtagplugin.php
+++ b/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/systemtag/systemtagsbyidcollection.php b/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php
index 5aa28d1a254..7722ac08df5 100644
--- a/apps/dav/tests/unit/systemtag/systemtagsbyidcollection.php
+++ b/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php
@@ -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
diff --git a/apps/dav/tests/unit/systemtag/systemtagsobjectmappingcollection.php b/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php
index 9adc5b88c41..63ab6032f7a 100644
--- a/apps/dav/tests/unit/systemtag/systemtagsobjectmappingcollection.php
+++ b/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/systemtag/systemtagsobjecttypecollection.php b/apps/dav/tests/unit/SystemTag/SystemTagsObjectTypeCollectionTest.php
index 1d4264f94f9..036b4150426 100644
--- a/apps/dav/tests/unit/systemtag/systemtagsobjecttypecollection.php
+++ b/apps/dav/tests/unit/SystemTag/SystemTagsObjectTypeCollectionTest.php
@@ -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;
diff --git a/apps/dav/tests/unit/upload/assemblystreamtest.php b/apps/dav/tests/unit/Upload/AssemblyStreamTest.php
index 373d525a9dd..b8fb1aa12e4 100644
--- a/apps/dav/tests/unit/upload/assemblystreamtest.php
+++ b/apps/dav/tests/unit/Upload/AssemblyStreamTest.php
@@ -1,6 +1,7 @@
<?php
+namespace OCA\DAV\Tests\unit\Upload;
-class AssemblyStreamTest extends \PHPUnit_Framework_TestCase {
+class AssemblyStreamTest extends \Test\TestCase {
/**
* @dataProvider providesNodes()
diff --git a/apps/dav/tests/unit/upload/futurefiletest.php b/apps/dav/tests/unit/Upload/FutureFileTest.php
index c0c14bf04d7..7e1c84ef5ad 100644
--- a/apps/dav/tests/unit/upload/futurefiletest.php
+++ b/apps/dav/tests/unit/Upload/FutureFileTest.php
@@ -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();
diff --git a/apps/dav/tests/unit/phpunit.xml b/apps/dav/tests/unit/phpunit.xml
index 314855d863b..e483515ca7a 100644
--- a/apps/dav/tests/unit/phpunit.xml
+++ b/apps/dav/tests/unit/phpunit.xml
@@ -6,7 +6,7 @@
timeoutForLargeTests="900"
>
<testsuite name='unit'>
- <directory suffix='.php'>.</directory>
+ <directory suffix='Test.php'>.</directory>
</testsuite>
<!-- filters for code coverage -->
<filter>