Adding more DB groups to test suits

Adding more DB groups to test suits
This commit is contained in:
Thomas Müller 2015-11-20 11:27:11 +01:00
parent e265e982bf
commit 757aa45db7
33 changed files with 210 additions and 7 deletions

View File

@ -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();

View File

@ -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;

View File

@ -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();

View File

@ -38,6 +38,8 @@ use OCP\Share;
use OC\URLGenerator;
/**
* @group DB
*
* @package OCA\Files_Sharing\Controllers
*/
class ShareControllerTest extends \Test\TestCase {

View File

@ -24,6 +24,8 @@
/**
* Tests for the external Storage class for remote shares.
*
* @group DB
*/
class Test_Files_Sharing_External_Storage extends \Test\TestCase {

View File

@ -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 */

View File

@ -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

View File

@ -29,6 +29,8 @@ use OCA\Files_Trashbin;
/**
* Class Test_Encryption
*
* @group DB
*/
class Test_Trashbin extends \Test\TestCase {

View File

@ -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 {

View File

@ -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());
}

View File

@ -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();

View File

@ -44,6 +44,8 @@ function is_uploaded_file($filename) {
/**
* Class AvatarControllerTest
*
* @group DB
*
* @package OC\Core\Avatar
*/
class AvatarControllerTest extends \Test\TestCase {

View File

@ -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 */

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -22,6 +22,13 @@
namespace Test\Files\Storage;
/**
* Class CommonTest
*
* @group DB
*
* @package Test\Files\Storage
*/
class CommonTest extends Storage {
/**
* @var string tmpDir

View File

@ -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() {

View File

@ -47,6 +47,13 @@ class DummyUser extends User {
}
}
/**
* Class Home
*
* @group DB
*
* @package Test\Files\Storage
*/
class Home extends Storage {
/**
* @var string tmpDir

View File

@ -22,6 +22,13 @@
namespace Test\Files\Storage;
/**
* Class Local
*
* @group DB
*
* @package Test\Files\Storage
*/
class Local extends Storage {
/**
* @var string tmpDir

View File

@ -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

View File

@ -8,8 +8,9 @@
/**
* Test the storage functions of OC_Helper
*
* @group DB
*/
class Test_Helper_Storage extends \Test\TestCase {
/** @var string */
private $user;

View File

@ -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();

View File

@ -20,6 +20,11 @@
*
*/
/**
* Class Test_OC_OCS_Privatedata
*
* @group DB
*/
class Test_OC_OCS_Privatedata extends \Test\TestCase {
private $appKey;

View File

@ -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;

View File

@ -21,6 +21,13 @@
namespace Test\Preview;
/**
* Class Bitmap
*
* @group DB
*
* @package Test\Preview
*/
class Bitmap extends Provider {
public function setUp() {

View File

@ -21,6 +21,13 @@
namespace Test\Preview;
/**
* Class Image
*
* @group DB
*
* @package Test\Preview
*/
class Image extends Provider {
public function setUp() {

View File

@ -21,6 +21,13 @@
namespace Test\Preview;
/**
* Class MP3
*
* @group DB
*
* @package Test\Preview
*/
class MP3 extends Provider {
public function setUp() {

View File

@ -21,6 +21,13 @@
namespace Test\Preview;
/**
* Class SVG
*
* @group DB
*
* @package Test\Preview
*/
class SVG extends Provider {
public function setUp() {

View File

@ -21,6 +21,13 @@
namespace Test\Preview;
/**
* Class TXT
*
* @group DB
*
* @package Test\Preview
*/
class TXT extends Provider {
public function setUp() {

View File

@ -24,6 +24,13 @@
namespace Test;
/**
* Class Server
*
* @group DB
*
* @package Test
*/
class Server extends \Test\TestCase {
/** @var \OC\Server */
protected $server;

View File

@ -20,6 +20,11 @@
*
*/
/**
* Class Test_StreamWrappers
*
* @group DB
*/
class Test_StreamWrappers extends \Test\TestCase {
private static $trashBinStatus;