Browse Source

Add DB group to some files_external tests

Adding group Db to federation tests and ldap tests

Add group DB to Test_UrlGenerator

Adding group DB to trashbin and versions tests

Adding group DB to Test_Util_CheckServer for pg
tags/v9.0beta1
Thomas Müller 8 years ago
parent
commit
f9fc254672

+ 7
- 0
apps/federation/tests/backgroundjob/getsharedsecrettest.php View File

@@ -34,6 +34,13 @@ use OCP\Http\Client\IResponse;
use OCP\ILogger;
use OCP\IURLGenerator;

/**
* Class GetSharedSecretTest
*
* @group DB
*
* @package OCA\Federation\Tests\BackgroundJob
*/
class GetSharedSecretTest extends TestCase {

/** @var \PHPUnit_Framework_MockObject_MockObject | IClient */

+ 7
- 0
apps/files_external/tests/amazons3migration.php View File

@@ -25,6 +25,13 @@

namespace Test\Files\Storage;

/**
* Class AmazonS3Migration
*
* @group DB
*
* @package Test\Files\Storage
*/
class AmazonS3Migration extends \Test\TestCase {

/**

+ 7
- 0
apps/files_external/tests/etagpropagator.php View File

@@ -26,6 +26,13 @@ namespace Tests\Files_External;
use OC\Files\Filesystem;
use OC\User\User;

/**
* Class EtagPropagator
*
* @group DB
*
* @package Tests\Files_External
*/
class EtagPropagator extends \Test\TestCase {
protected function getUser() {
return new User($this->getUniqueID(), null);

+ 7
- 0
apps/files_external/tests/owncloudfunctions.php View File

@@ -24,6 +24,13 @@

namespace Test\Files\Storage;

/**
* Class OwnCloudFunctions
*
* @group DB
*
* @package Test\Files\Storage
*/
class OwnCloudFunctions extends \Test\TestCase {

function configUrlProvider() {

+ 7
- 0
apps/files_trashbin/tests/command/expiretest.php View File

@@ -24,6 +24,13 @@ namespace OCA\Files_Trashbin\Tests\Command;
use OCA\Files_Trashbin\Command\Expire;
use Test\TestCase;

/**
* Class ExpireTest
*
* @group DB
*
* @package OCA\Files_Trashbin\Tests\Command
*/
class ExpireTest extends TestCase {
public function testExpireNonExistingUser() {
$command = new Expire('test');

+ 7
- 0
apps/files_versions/tests/command/cleanuptest.php View File

@@ -28,6 +28,13 @@ use Test\TestCase;
use OC\User\Manager;
use OCP\Files\IRootFolder;

/**
* Class CleanupTest
*
* @group DB
*
* @package OCA\Files_Versions\Tests\Command
*/
class CleanupTest extends TestCase {

/** @var CleanUp */

+ 7
- 0
apps/files_versions/tests/command/expiretest.php View File

@@ -25,6 +25,13 @@ namespace OCA\Files_Versions\Tests\Command;
use OCA\Files_Versions\Command\Expire;
use Test\TestCase;

/**
* Class ExpireTest
*
* @group DB
*
* @package OCA\Files_Versions\Tests\Command
*/
class ExpireTest extends TestCase {
public function testExpireNonExistingUser() {
$command = new Expire($this->getUniqueID('test'), '');

+ 7
- 0
apps/user_ldap/tests/access.php View File

@@ -28,6 +28,13 @@ use \OCA\user_ldap\lib\Access;
use \OCA\user_ldap\lib\Connection;
use \OCA\user_ldap\lib\ILDAPWrapper;

/**
* Class Test_Access
*
* @group DB
*
* @package OCA\user_ldap\tests
*/
class Test_Access extends \Test\TestCase {
private function getConnectorAndLdapMock() {
static $conMethods;

+ 8
- 1
apps/user_ldap/tests/connection.php View File

@@ -23,6 +23,13 @@

namespace OCA\user_ldap\tests;

/**
* Class Test_Connection
*
* @group DB
*
* @package OCA\user_ldap\tests
*/
class Test_Connection extends \Test\TestCase {

public function testOriginalAgentUnchangedOnClone() {
@@ -52,4 +59,4 @@ class Test_Connection extends \Test\TestCase {
$this->assertSame($agentPawd, $agent['ldapAgentPassword']);
}

}
}

+ 7
- 0
apps/user_ldap/tests/group_ldap.php View File

@@ -30,6 +30,13 @@ use \OCA\user_ldap\lib\Access;
use \OCA\user_ldap\lib\Connection;
use \OCA\user_ldap\lib\ILDAPWrapper;

/**
* Class Test_Group_Ldap
*
* @group DB
*
* @package OCA\user_ldap\tests
*/
class Test_Group_Ldap extends \Test\TestCase {
private function getAccessMock() {
static $conMethods;

+ 7
- 0
apps/user_ldap/tests/mapping/groupmapping.php View File

@@ -24,6 +24,13 @@ namespace OCA\user_ldap\tests\mapping;

use OCA\User_LDAP\Mapping\GroupMapping;

/**
* Class Test_GroupMapping
*
* @group DB
*
* @package OCA\user_ldap\tests\mapping
*/
class Test_GroupMapping extends AbstractMappingTest {
public function getMapper(\OCP\IDBConnection $dbMock) {
return new GroupMapping($dbMock);

+ 7
- 0
apps/user_ldap/tests/mapping/usermapping.php View File

@@ -24,6 +24,13 @@ namespace OCA\user_ldap\tests\mapping;

use OCA\User_LDAP\Mapping\UserMapping;

/**
* Class Test_UserMapping
*
* @group DB
*
* @package OCA\user_ldap\tests\mapping
*/
class Test_UserMapping extends AbstractMappingTest {
public function getMapper(\OCP\IDBConnection $dbMock) {
return new UserMapping($dbMock);

+ 7
- 0
apps/user_ldap/tests/user/manager.php View File

@@ -26,6 +26,13 @@ namespace OCA\user_ldap\tests;

use OCA\user_ldap\lib\user\Manager;

/**
* Class Test_User_Manager
*
* @group DB
*
* @package OCA\user_ldap\tests
*/
class Test_User_Manager extends \Test\TestCase {

private function getTestInstances() {

+ 7
- 0
apps/user_ldap/tests/user/user.php View File

@@ -25,6 +25,13 @@ namespace OCA\user_ldap\tests;

use OCA\user_ldap\lib\user\User;

/**
* Class Test_User_User
*
* @group DB
*
* @package OCA\user_ldap\tests
*/
class Test_User_User extends \Test\TestCase {

private function getTestInstances() {

+ 7
- 0
apps/user_ldap/tests/user_ldap.php View File

@@ -31,6 +31,13 @@ use \OCA\user_ldap\lib\Access;
use \OCA\user_ldap\lib\Connection;
use \OCA\user_ldap\lib\ILDAPWrapper;

/**
* Class Test_User_Ldap_Direct
*
* @group DB
*
* @package OCA\user_ldap\tests
*/
class Test_User_Ldap_Direct extends \Test\TestCase {
protected $backend;
protected $access;

+ 7
- 0
apps/user_ldap/tests/wizard.php View File

@@ -31,6 +31,13 @@ use \OCA\user_ldap\lib\Wizard;
// use \OCA\user_ldap\lib\Configuration;
// use \OCA\user_ldap\lib\ILDAPWrapper;

/**
* Class Test_Wizard
*
* @group DB
*
* @package OCA\user_ldap\tests
*/
class Test_Wizard extends \Test\TestCase {
protected function setUp() {
parent::setUp();

+ 1
- 0
lib/private/files/storage/dav.php View File

@@ -105,6 +105,7 @@ class DAV extends Common {
$this->secure = false;
}
if ($this->secure === true) {
// inject mock for testing
$certPath = \OC_User::getHome(\OC_User::getUser()) . '/files_external/rootcerts.crt';
if (file_exists($certPath)) {
$this->certPath = $certPath;

+ 1
- 0
lib/private/urlgenerator.php View File

@@ -62,6 +62,7 @@ class URLGenerator implements IURLGenerator {
* Returns a url to the given route.
*/
public function linkToRoute($route, $parameters = array()) {
// TODO: mock router
$urlLinkTo = \OC::$server->getRouter()->generate($route, $parameters);
return $urlLinkTo;
}

tests/lib/urlgenerator.php → tests/lib/urlGenerator.php View File

@@ -6,7 +6,12 @@
* See the COPYING-README file.
*/

class Test_Urlgenerator extends \Test\TestCase {
/**
* Class Test_UrlGenerator
*
* @group DB
*/
class Test_UrlGenerator extends \Test\TestCase {

/**
* @small

+ 2
- 0
tests/lib/utilcheckserver.php View File

@@ -8,6 +8,8 @@

/**
* Tests for server check functions
*
* @group DB
*/
class Test_Util_CheckServer extends \Test\TestCase {


Loading…
Cancel
Save