diff options
33 files changed, 210 insertions, 7 deletions
diff --git a/apps/dav/tests/unit/connector/sabre/requesttest/downloadtest.php b/apps/dav/tests/unit/connector/sabre/requesttest/downloadtest.php index 245deff3b31..29454c38218 100644 --- a/apps/dav/tests/unit/connector/sabre/requesttest/downloadtest.php +++ b/apps/dav/tests/unit/connector/sabre/requesttest/downloadtest.php @@ -11,6 +11,13 @@ namespace OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest; use OCP\AppFramework\Http; use OCP\Lock\ILockingProvider; +/** + * Class DownloadTest + * + * @group DB + * + * @package OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest + */ class DownloadTest extends RequestTest { public function testDownload() { $user = $this->getUniqueID(); diff --git a/apps/dav/tests/unit/connector/sabre/requesttest/encryptionuploadtest.php b/apps/dav/tests/unit/connector/sabre/requesttest/encryptionuploadtest.php index ed1d6046d75..b79dfa0c265 100644 --- a/apps/dav/tests/unit/connector/sabre/requesttest/encryptionuploadtest.php +++ b/apps/dav/tests/unit/connector/sabre/requesttest/encryptionuploadtest.php @@ -11,6 +11,13 @@ namespace OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest; use OC\Files\View; use Test\Traits\EncryptionTrait; +/** + * Class EncryptionUploadTest + * + * @group DB + * + * @package OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest + */ class EncryptionUploadTest extends UploadTest { use EncryptionTrait; diff --git a/apps/dav/tests/unit/connector/sabre/requesttest/uploadtest.php b/apps/dav/tests/unit/connector/sabre/requesttest/uploadtest.php index a2a8326f4ff..c1876a7f29f 100644 --- a/apps/dav/tests/unit/connector/sabre/requesttest/uploadtest.php +++ b/apps/dav/tests/unit/connector/sabre/requesttest/uploadtest.php @@ -12,6 +12,13 @@ use OC\Connector\Sabre\Exception\FileLocked; use OCP\AppFramework\Http; use OCP\Lock\ILockingProvider; +/** + * Class UploadTest + * + * @group DB + * + * @package OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest + */ class UploadTest extends RequestTest { public function testBasicUpload() { $user = $this->getUniqueID(); diff --git a/apps/files_sharing/tests/controller/sharecontroller.php b/apps/files_sharing/tests/controller/sharecontroller.php index db5eb75d761..ccef4263c2b 100644 --- a/apps/files_sharing/tests/controller/sharecontroller.php +++ b/apps/files_sharing/tests/controller/sharecontroller.php @@ -38,6 +38,8 @@ use OCP\Share; use OC\URLGenerator; /** + * @group DB + * * @package OCA\Files_Sharing\Controllers */ class ShareControllerTest extends \Test\TestCase { diff --git a/apps/files_sharing/tests/externalstorage.php b/apps/files_sharing/tests/externalstorage.php index a549e093dc1..109545119ba 100644 --- a/apps/files_sharing/tests/externalstorage.php +++ b/apps/files_sharing/tests/externalstorage.php @@ -24,6 +24,8 @@ /** * Tests for the external Storage class for remote shares. + * + * @group DB */ class Test_Files_Sharing_External_Storage extends \Test\TestCase { diff --git a/apps/files_trashbin/tests/command/cleanuptest.php b/apps/files_trashbin/tests/command/cleanuptest.php index e928f55eb8b..82084a2d525 100644 --- a/apps/files_trashbin/tests/command/cleanuptest.php +++ b/apps/files_trashbin/tests/command/cleanuptest.php @@ -29,6 +29,13 @@ use Test\TestCase; use OC\User\Manager; use OCP\Files\IRootFolder; +/** + * Class CleanUpTest + * + * @group DB + * + * @package OCA\Files_Trashbin\Tests\Command + */ class CleanUpTest extends TestCase { /** @var CleanUp */ diff --git a/apps/files_trashbin/tests/storage.php b/apps/files_trashbin/tests/storage.php index 44b680f265c..3ebbbc3ec9d 100644 --- a/apps/files_trashbin/tests/storage.php +++ b/apps/files_trashbin/tests/storage.php @@ -27,6 +27,13 @@ namespace OCA\Files_trashbin\Tests\Storage; use OC\Files\Storage\Temporary; use OC\Files\Filesystem; +/** + * Class Storage + * + * @group DB + * + * @package OCA\Files_trashbin\Tests\Storage + */ class Storage extends \Test\TestCase { /** * @var string diff --git a/apps/files_trashbin/tests/trashbin.php b/apps/files_trashbin/tests/trashbin.php index 934f831ef74..1b5e955d2b2 100644 --- a/apps/files_trashbin/tests/trashbin.php +++ b/apps/files_trashbin/tests/trashbin.php @@ -29,6 +29,8 @@ use OCA\Files_Trashbin; /** * Class Test_Encryption + * + * @group DB */ class Test_Trashbin extends \Test\TestCase { diff --git a/apps/files_versions/tests/versions.php b/apps/files_versions/tests/versions.php index 6ebbf830e70..ffc98c2e98c 100644 --- a/apps/files_versions/tests/versions.php +++ b/apps/files_versions/tests/versions.php @@ -34,6 +34,8 @@ use OC\Files\Storage\Temporary; /** * Class Test_Files_versions * this class provide basic files versions test + * + * @group DB */ class Test_Files_Versioning extends \Test\TestCase { diff --git a/apps/provisioning_api/tests/appstest.php b/apps/provisioning_api/tests/appstest.php index 2e1a86025c2..4ccba704a3a 100644 --- a/apps/provisioning_api/tests/appstest.php +++ b/apps/provisioning_api/tests/appstest.php @@ -23,15 +23,35 @@ */ namespace OCA\Provisioning_API\Tests; +use OCA\Provisioning_API\Apps; +use OCP\API; +use OCP\App\IAppManager; +use OCP\IUserSession; +/** + * Class AppsTest + * + * @group DB + * + * @package OCA\Provisioning_API\Tests + */ class AppsTest extends TestCase { - + + /** @var IAppManager */ + private $appManager; + + /** @var Apps */ + private $api; + + /** @var IUserSession */ + private $userSession; + public function setup() { parent::setup(); $this->appManager = \OC::$server->getAppManager(); $this->groupManager = \OC::$server->getGroupManager(); $this->userSession = \OC::$server->getUserSession(); - $this->api = new \OCA\Provisioning_API\Apps($this->appManager); + $this->api = new Apps($this->appManager); } public function testGetAppInfo() { @@ -46,7 +66,7 @@ class AppsTest extends TestCase { $result = $this->api->getAppInfo(['appid' => 'not_provisioning_api']); $this->assertInstanceOf('OC_OCS_Result', $result); $this->assertFalse($result->succeeded()); - $this->assertEquals(\OCP\API::RESPOND_NOT_FOUND, $result->getStatusCode()); + $this->assertEquals(API::RESPOND_NOT_FOUND, $result->getStatusCode()); } diff --git a/apps/provisioning_api/tests/testcase.php b/apps/provisioning_api/tests/testcase.php index 113bc512243..0cbe0d89f86 100644 --- a/apps/provisioning_api/tests/testcase.php +++ b/apps/provisioning_api/tests/testcase.php @@ -23,10 +23,13 @@ namespace OCA\Provisioning_API\Tests; +use OCP\IUser; use OCP\IUserManager; use OCP\IGroupManager; abstract class TestCase extends \Test\TestCase { + + /** @var IUser[] */ protected $users = array(); /** @var IUserManager */ @@ -46,7 +49,7 @@ abstract class TestCase extends \Test\TestCase { /** * Generates a temp user * @param int $num number of users to generate - * @return IUser[]|Iuser + * @return IUser[]|IUser */ protected function generateUsers($num = 1) { $users = array(); diff --git a/tests/core/avatar/avatarcontrollertest.php b/tests/core/avatar/avatarcontrollertest.php index 948a432d2ed..efe41763ff7 100644 --- a/tests/core/avatar/avatarcontrollertest.php +++ b/tests/core/avatar/avatarcontrollertest.php @@ -44,6 +44,8 @@ function is_uploaded_file($filename) { /** * Class AvatarControllerTest * + * @group DB + * * @package OC\Core\Avatar */ class AvatarControllerTest extends \Test\TestCase { diff --git a/tests/lib/encryption/decryptalltest.php b/tests/lib/encryption/decryptalltest.php index ce5bcf1e5ae..85fbe3e0ed9 100644 --- a/tests/lib/encryption/decryptalltest.php +++ b/tests/lib/encryption/decryptalltest.php @@ -30,6 +30,13 @@ use OC\Files\View; use OCP\IUserManager; use Test\TestCase; +/** + * Class DecryptAllTest + * + * @group DB + * + * @package Test\Encryption + */ class DecryptAllTest extends TestCase { /** @var \PHPUnit_Framework_MockObject_MockObject | IUserManager */ diff --git a/tests/lib/files/cache/wrapper/cachejail.php b/tests/lib/files/cache/wrapper/cachejail.php index 13f3dc8858e..9ddf3e9c61c 100644 --- a/tests/lib/files/cache/wrapper/cachejail.php +++ b/tests/lib/files/cache/wrapper/cachejail.php @@ -10,6 +10,13 @@ namespace Test\Files\Cache\Wrapper; use Test\Files\Cache\Cache; +/** + * Class CacheJail + * + * @group DB + * + * @package Test\Files\Cache\Wrapper + */ class CacheJail extends Cache { /** * @var \OC\Files\Cache\Cache $sourceCache diff --git a/tests/lib/files/cache/wrapper/cachepermissionsmask.php b/tests/lib/files/cache/wrapper/cachepermissionsmask.php index 72fd22741d3..a4cc7edba37 100644 --- a/tests/lib/files/cache/wrapper/cachepermissionsmask.php +++ b/tests/lib/files/cache/wrapper/cachepermissionsmask.php @@ -11,6 +11,13 @@ namespace Test\Files\Cache\Wrapper; use OCP\Constants; use Test\Files\Cache\Cache; +/** + * Class CachePermissionsMask + * + * @group DB + * + * @package Test\Files\Cache\Wrapper + */ class CachePermissionsMask extends Cache { /** * @var \OC\Files\Cache\Cache $sourceCache diff --git a/tests/lib/files/node/folder.php b/tests/lib/files/node/folder.php index 8c98256575e..2c9339bb6dc 100644 --- a/tests/lib/files/node/folder.php +++ b/tests/lib/files/node/folder.php @@ -16,6 +16,13 @@ use OCP\Files\NotFoundException; use OCP\Files\NotPermittedException; use OC\Files\View; +/** + * Class Folder + * + * @group DB + * + * @package Test\Files\Node + */ class Folder extends \Test\TestCase { private $user; diff --git a/tests/lib/files/node/hookconnector.php b/tests/lib/files/node/hookconnector.php index 10566cf5fb1..646e3952a38 100644 --- a/tests/lib/files/node/hookconnector.php +++ b/tests/lib/files/node/hookconnector.php @@ -17,6 +17,13 @@ use Test\TestCase; use Test\Traits\MountProviderTrait; use Test\Traits\UserTrait; +/** + * Class HookConnector + * + * @group DB + * + * @package Test\Files\Node + */ class HookConnector extends TestCase { use UserTrait; use MountProviderTrait; diff --git a/tests/lib/files/storage/commontest.php b/tests/lib/files/storage/commontest.php index 2b70dc8713e..bbe6f2a73e2 100644 --- a/tests/lib/files/storage/commontest.php +++ b/tests/lib/files/storage/commontest.php @@ -22,6 +22,13 @@ namespace Test\Files\Storage; +/** + * Class CommonTest + * + * @group DB + * + * @package Test\Files\Storage + */ class CommonTest extends Storage { /** * @var string tmpDir diff --git a/tests/lib/files/storage/copydirectory.php b/tests/lib/files/storage/copydirectory.php index 3338747f49b..bc066268cda 100644 --- a/tests/lib/files/storage/copydirectory.php +++ b/tests/lib/files/storage/copydirectory.php @@ -36,6 +36,13 @@ class CopyDirectoryStorage extends StorageNoRecursiveCopy { use \OC\Files\Storage\PolyFill\CopyDirectory; } +/** + * Class CopyDirectory + * + * @group DB + * + * @package Test\Files\Storage + */ class CopyDirectory extends Storage { protected function setUp() { diff --git a/tests/lib/files/storage/home.php b/tests/lib/files/storage/home.php index b0670a22892..a51912ca1b2 100644 --- a/tests/lib/files/storage/home.php +++ b/tests/lib/files/storage/home.php @@ -47,6 +47,13 @@ class DummyUser extends User { } } +/** + * Class Home + * + * @group DB + * + * @package Test\Files\Storage + */ class Home extends Storage { /** * @var string tmpDir diff --git a/tests/lib/files/storage/local.php b/tests/lib/files/storage/local.php index d2b27117c3b..36267dc6605 100644 --- a/tests/lib/files/storage/local.php +++ b/tests/lib/files/storage/local.php @@ -22,6 +22,13 @@ namespace Test\Files\Storage; +/** + * Class Local + * + * @group DB + * + * @package Test\Files\Storage + */ class Local extends Storage { /** * @var string tmpDir diff --git a/tests/lib/files/storage/wrapper/quota.php b/tests/lib/files/storage/wrapper/quota.php index 441f3a39d32..b0a06b0d898 100644 --- a/tests/lib/files/storage/wrapper/quota.php +++ b/tests/lib/files/storage/wrapper/quota.php @@ -11,6 +11,13 @@ namespace Test\Files\Storage\Wrapper; //ensure the constants are loaded \OC::$loader->load('\OC\Files\Filesystem'); +/** + * Class Quota + * + * @group DB + * + * @package Test\Files\Storage\Wrapper + */ class Quota extends \Test\Files\Storage\Storage { /** * @var string tmpDir diff --git a/tests/lib/helperstorage.php b/tests/lib/helperstorage.php index 8b5f41fc94c..d41bc68a7b1 100644 --- a/tests/lib/helperstorage.php +++ b/tests/lib/helperstorage.php @@ -8,8 +8,9 @@ /** * Test the storage functions of OC_Helper + * + * @group DB */ - class Test_Helper_Storage extends \Test\TestCase { /** @var string */ private $user; diff --git a/tests/lib/log/owncloud.php b/tests/lib/log/owncloud.php index d977583612b..8cc6aa9d57a 100644 --- a/tests/lib/log/owncloud.php +++ b/tests/lib/log/owncloud.php @@ -15,6 +15,11 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +/** + * Class Test_Log_Owncloud + * + * @group DB + */ class Test_Log_Owncloud extends Test\TestCase { private $restore_logfile; @@ -22,8 +27,8 @@ class Test_Log_Owncloud extends Test\TestCase protected function setUp() { parent::setUp(); - $restore_logfile = OC_Config::getValue("logfile"); - $restore_logdateformat = OC_Config::getValue('logdateformat'); + $this->restore_logfile = OC_Config::getValue("logfile"); + $this->restore_logdateformat = OC_Config::getValue('logdateformat'); OC_Config::setValue("logfile", OC_Config::getValue('datadirectory') . "/logtest"); OC_Log_Owncloud::init(); diff --git a/tests/lib/ocs/privatedata.php b/tests/lib/ocs/privatedata.php index a9300f5beac..ce153bf07d6 100644 --- a/tests/lib/ocs/privatedata.php +++ b/tests/lib/ocs/privatedata.php @@ -20,6 +20,11 @@ * */ +/** + * Class Test_OC_OCS_Privatedata + * + * @group DB + */ class Test_OC_OCS_Privatedata extends \Test\TestCase { private $appKey; diff --git a/tests/lib/preview.php b/tests/lib/preview.php index e4c599c66cf..bc6f849cbe8 100644 --- a/tests/lib/preview.php +++ b/tests/lib/preview.php @@ -28,6 +28,13 @@ use OC\Files\View; use Test\Traits\MountProviderTrait; use Test\Traits\UserTrait; +/** + * Class Preview + * + * @group DB + * + * @package Test + */ class Preview extends TestCase { use UserTrait; use MountProviderTrait; diff --git a/tests/lib/preview/bitmap.php b/tests/lib/preview/bitmap.php index 49112852e29..1e135ceb083 100644 --- a/tests/lib/preview/bitmap.php +++ b/tests/lib/preview/bitmap.php @@ -21,6 +21,13 @@ namespace Test\Preview; +/** + * Class Bitmap + * + * @group DB + * + * @package Test\Preview + */ class Bitmap extends Provider { public function setUp() { diff --git a/tests/lib/preview/image.php b/tests/lib/preview/image.php index af46f4e4a66..6c82ff85723 100644 --- a/tests/lib/preview/image.php +++ b/tests/lib/preview/image.php @@ -21,6 +21,13 @@ namespace Test\Preview; +/** + * Class Image + * + * @group DB + * + * @package Test\Preview + */ class Image extends Provider { public function setUp() { diff --git a/tests/lib/preview/mp3.php b/tests/lib/preview/mp3.php index ac3ab07a2bd..f6875a88ebd 100644 --- a/tests/lib/preview/mp3.php +++ b/tests/lib/preview/mp3.php @@ -21,6 +21,13 @@ namespace Test\Preview; +/** + * Class MP3 + * + * @group DB + * + * @package Test\Preview + */ class MP3 extends Provider { public function setUp() { diff --git a/tests/lib/preview/svg.php b/tests/lib/preview/svg.php index 768569c72ed..ef5f4cff80f 100644 --- a/tests/lib/preview/svg.php +++ b/tests/lib/preview/svg.php @@ -21,6 +21,13 @@ namespace Test\Preview; +/** + * Class SVG + * + * @group DB + * + * @package Test\Preview + */ class SVG extends Provider { public function setUp() { diff --git a/tests/lib/preview/txt.php b/tests/lib/preview/txt.php index 8bda86f25e3..219b850be95 100644 --- a/tests/lib/preview/txt.php +++ b/tests/lib/preview/txt.php @@ -21,6 +21,13 @@ namespace Test\Preview; +/** + * Class TXT + * + * @group DB + * + * @package Test\Preview + */ class TXT extends Provider { public function setUp() { diff --git a/tests/lib/server.php b/tests/lib/server.php index 96a476bd4d1..b72bef82036 100644 --- a/tests/lib/server.php +++ b/tests/lib/server.php @@ -24,6 +24,13 @@ namespace Test; +/** + * Class Server + * + * @group DB + * + * @package Test + */ class Server extends \Test\TestCase { /** @var \OC\Server */ protected $server; diff --git a/tests/lib/streamwrappers.php b/tests/lib/streamwrappers.php index 6216c5a4be8..9b097535280 100644 --- a/tests/lib/streamwrappers.php +++ b/tests/lib/streamwrappers.php @@ -20,6 +20,11 @@ * */ +/** + * Class Test_StreamWrappers + * + * @group DB + */ class Test_StreamWrappers extends \Test\TestCase { private static $trashBinStatus; |