Move tests/ to PSR-4
This commit is contained in:
parent
b616318327
commit
3ef8c95b37
|
@ -23,19 +23,19 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\user_ldap\tests;
|
||||
namespace OCA\User_LDAP\Tests;
|
||||
|
||||
use OCA\User_LDAP\Access;
|
||||
use OCA\User_LDAP\Connection;
|
||||
|
||||
/**
|
||||
* Class Test_Access
|
||||
* Class AccessTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\user_ldap\tests
|
||||
* @package OCA\User_LDAP\Tests
|
||||
*/
|
||||
class Test_Access extends \Test\TestCase {
|
||||
class AccessTest extends \Test\TestCase {
|
||||
private function getConnectorAndLdapMock() {
|
||||
static $conMethods;
|
||||
static $accMethods;
|
|
@ -19,9 +19,9 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\user_ldap\tests;
|
||||
namespace OCA\User_LDAP\Tests;
|
||||
|
||||
class Test_Configuration extends \Test\TestCase {
|
||||
class ConfigurationTest extends \Test\TestCase {
|
||||
|
||||
public function configurationDataProvider() {
|
||||
$inputWithDN = array(
|
|
@ -22,7 +22,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\user_ldap\tests;
|
||||
namespace OCA\User_LDAP\Tests;
|
||||
use OCA\User_LDAP\Connection;
|
||||
|
||||
/**
|
||||
|
@ -30,9 +30,9 @@ use OCA\User_LDAP\Connection;
|
|||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\user_ldap\tests
|
||||
* @package OCA\User_LDAP\Tests
|
||||
*/
|
||||
class Test_Connection extends \Test\TestCase {
|
||||
class ConnectionTest extends \Test\TestCase {
|
||||
/** @var \OCA\User_LDAP\ILDAPWrapper */
|
||||
protected $ldap;
|
||||
|
|
@ -35,9 +35,9 @@ use OCA\User_LDAP\Connection;
|
|||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\user_ldap\tests
|
||||
* @package OCA\User_LDAP\Tests
|
||||
*/
|
||||
class GroupLDAPTest extends \Test\TestCase {
|
||||
class Group_LDAPTest extends \Test\TestCase {
|
||||
private function getAccessMock() {
|
||||
static $conMethods;
|
||||
static $accMethods;
|
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\user_ldap\tests\integration;
|
||||
namespace OCA\User_LDAP\Tests\Integration;
|
||||
|
||||
use OCA\User_LDAP\Access;
|
||||
use OCA\User_LDAP\Connection;
|
|
@ -19,6 +19,9 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\User_LDAP\Tests\Integration;
|
||||
|
||||
|
||||
use OC\ServerNotAvailableException;
|
||||
use OCA\User_LDAP\LDAP;
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\user_ldap\tests\integration;
|
||||
namespace OCA\User_LDAP\Tests\Integration;
|
||||
|
||||
/**
|
||||
* Class FakeManager
|
|
@ -19,10 +19,10 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\user_ldap\tests\integration\lib;
|
||||
namespace OCA\User_LDAP\Tests\Integration\Lib;
|
||||
|
||||
use OCA\User_LDAP\Connection;
|
||||
use OCA\user_ldap\tests\integration\AbstractIntegrationTest;
|
||||
|
||||
use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest;
|
||||
|
||||
require_once __DIR__ . '/../../../../../lib/base.php';
|
||||
|
|
@ -19,15 +19,15 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\user_ldap\tests\integration\lib;
|
||||
namespace OCA\User_LDAP\Tests\Integration\Lib;
|
||||
|
||||
use OCA\user_ldap\tests\integration\AbstractIntegrationTest;
|
||||
use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest;
|
||||
use OCA\User_LDAP\Mapping\UserMapping;
|
||||
use OCA\User_LDAP\User_LDAP;
|
||||
|
||||
require_once __DIR__ . '/../../../../../lib/base.php';
|
||||
|
||||
class IntegrationBackupServer extends AbstractIntegrationTest {
|
||||
class IntegrationTestBackupServer extends AbstractIntegrationTest {
|
||||
/** @var UserMapping */
|
||||
protected $mapping;
|
||||
|
|
@ -19,10 +19,10 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\user_ldap\tests\integration\lib;
|
||||
namespace OCA\User_LDAP\Tests\Integration\Lib;
|
||||
|
||||
use OCA\User_LDAP\Mapping\UserMapping;
|
||||
use OCA\user_ldap\tests\integration\AbstractIntegrationTest;
|
||||
use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest;
|
||||
|
||||
require_once __DIR__ . '/../../../../../lib/base.php';
|
||||
|
|
@ -19,16 +19,15 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\user_ldap\tests\integration\lib;
|
||||
namespace OCA\User_LDAP\Tests\Integration\Lib;
|
||||
|
||||
use OCA\User_LDAP\User\Manager as LDAPUserManager;
|
||||
use OCA\user_ldap\tests\integration\AbstractIntegrationTest;
|
||||
use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest;
|
||||
use OCA\User_LDAP\Mapping\UserMapping;
|
||||
use OCA\User_LDAP\User_LDAP;
|
||||
|
||||
require_once __DIR__ . '/../../../../../lib/base.php';
|
||||
|
||||
class IntegrationConnect extends AbstractIntegrationTest {
|
||||
class IntegrationTestConnect extends AbstractIntegrationTest {
|
||||
/** @var UserMapping */
|
||||
protected $mapping;
|
||||
|
|
@ -19,16 +19,13 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\user_ldap\tests\integration\lib;
|
||||
namespace OCA\User_LDAP\Tests\Integration\Lib;
|
||||
|
||||
use OCA\User_LDAP\User\Manager as LDAPUserManager;
|
||||
use OCA\user_ldap\tests\integration\AbstractIntegrationTest;
|
||||
use OCA\User_LDAP\Mapping\UserMapping;
|
||||
use OCA\User_LDAP\User_LDAP;
|
||||
use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest;
|
||||
|
||||
require_once __DIR__ . '/../../../../../lib/base.php';
|
||||
|
||||
class IntegrationTestUserHome extends AbstractIntegrationTest {
|
||||
class IntegrationTestCountUsersByLoginName extends AbstractIntegrationTest {
|
||||
|
||||
/**
|
||||
* prepares the LDAP environment and sets up a test configuration for
|
|
@ -19,16 +19,15 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\user_ldap\tests\integration\lib;
|
||||
namespace OCA\User_LDAP\Tests\Integration\Lib;
|
||||
|
||||
use OCA\User_LDAP\User\Manager as LDAPUserManager;
|
||||
use OCA\user_ldap\tests\integration\AbstractIntegrationTest;
|
||||
use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest;
|
||||
use OCA\User_LDAP\Mapping\UserMapping;
|
||||
use OCA\User_LDAP\User_LDAP;
|
||||
|
||||
require_once __DIR__ . '/../../../../../lib/base.php';
|
||||
|
||||
class IntegrationTestUserHome extends AbstractIntegrationTest {
|
||||
class IntegrationTestFetchUsersByLoginName extends AbstractIntegrationTest {
|
||||
/** @var UserMapping */
|
||||
protected $mapping;
|
||||
|
|
@ -19,10 +19,9 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\user_ldap\tests\integration\lib;
|
||||
namespace OCA\User_LDAP\Tests\Integration\Lib;
|
||||
|
||||
use OCA\User_LDAP\User\Manager as LDAPUserManager;
|
||||
use OCA\user_ldap\tests\integration\AbstractIntegrationTest;
|
||||
use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest;
|
||||
use OCA\User_LDAP\Mapping\UserMapping;
|
||||
use OCA\User_LDAP\User_LDAP;
|
||||
|
|
@ -19,10 +19,10 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\user_ldap\tests\integration\lib;
|
||||
namespace OCA\User_LDAP\Tests\Integration\Lib;
|
||||
|
||||
use OCA\User_LDAP\User\Manager as LDAPUserManager;
|
||||
use OCA\user_ldap\tests\integration\AbstractIntegrationTest;
|
||||
use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest;
|
||||
use OCA\User_LDAP\Mapping\UserMapping;
|
||||
use OCA\User_LDAP\User_LDAP;
|
||||
|
|
@ -21,9 +21,11 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\User_LDAP\Tests\Integration\Lib\User;
|
||||
|
||||
use OCA\User_LDAP\User\User;
|
||||
use OCA\User_LDAP\Mapping\UserMapping;
|
||||
use OCA\user_ldap\tests\integration\AbstractIntegrationTest;
|
||||
use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest;
|
||||
|
||||
require_once __DIR__ . '/../../../../../../lib/base.php';
|
||||
|
||||
|
@ -41,7 +43,7 @@ class IntegrationTestUserAvatar extends AbstractIntegrationTest {
|
|||
$this->mapping = new UserMapping(\OC::$server->getDatabaseConnection());
|
||||
$this->mapping->clear();
|
||||
$this->access->setUserMapper($this->mapping);
|
||||
$userBackend = new OCA\User_LDAP\User_LDAP($this->access, \OC::$server->getConfig());
|
||||
$userBackend = new \OCA\User_LDAP\User_LDAP($this->access, \OC::$server->getConfig());
|
||||
\OC_User::useBackend($userBackend);
|
||||
}
|
||||
|
|
@ -19,9 +19,10 @@
|
|||
*
|
||||
*/
|
||||
|
||||
use OCA\User_LDAP\User\User;
|
||||
namespace OCA\User_LDAP\Tests\Integration\Lib\User;
|
||||
|
||||
use OCA\User_LDAP\Mapping\UserMapping;
|
||||
use OCA\user_ldap\tests\integration\AbstractIntegrationTest;
|
||||
use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest;
|
||||
|
||||
require_once __DIR__ . '/../../../../../../lib/base.php';
|
||||
|
||||
|
@ -39,7 +40,7 @@ class IntegrationTestUserDisplayName extends AbstractIntegrationTest {
|
|||
$this->mapping = new UserMapping(\OC::$server->getDatabaseConnection());
|
||||
$this->mapping->clear();
|
||||
$this->access->setUserMapper($this->mapping);
|
||||
$userBackend = new OCA\User_LDAP\User_LDAP($this->access, \OC::$server->getConfig());
|
||||
$userBackend = new \OCA\User_LDAP\User_LDAP($this->access, \OC::$server->getConfig());
|
||||
\OC_User::useBackend($userBackend);
|
||||
}
|
||||
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 93 KiB |
|
@ -20,9 +20,9 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\user_ldap\tests;
|
||||
namespace OCA\User_LDAP\Tests\Jobs;
|
||||
|
||||
class Test_CleanUp extends \PHPUnit_Framework_TestCase {
|
||||
class CleanUpTest extends \Test\TestCase {
|
||||
public function getMocks() {
|
||||
$mocks = array();
|
||||
$mocks['userBackend'] =
|
|
@ -20,7 +20,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\user_ldap\tests\mapping;
|
||||
namespace OCA\User_LDAP\Tests\Mapping;
|
||||
|
||||
abstract class AbstractMappingTest extends \Test\TestCase {
|
||||
abstract public function getMapper(\OCP\IDBConnection $dbMock);
|
|
@ -21,18 +21,18 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\user_ldap\tests\mapping;
|
||||
namespace OCA\User_LDAP\Tests\Mapping;
|
||||
|
||||
use OCA\User_LDAP\Mapping\GroupMapping;
|
||||
|
||||
/**
|
||||
* Class Test_GroupMapping
|
||||
* Class GroupMappingTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\user_ldap\tests\mapping
|
||||
* @package OCA\User_LDAP\Tests\Mapping
|
||||
*/
|
||||
class Test_GroupMapping extends AbstractMappingTest {
|
||||
class GroupMappingTest extends AbstractMappingTest {
|
||||
public function getMapper(\OCP\IDBConnection $dbMock) {
|
||||
return new GroupMapping($dbMock);
|
||||
}
|
|
@ -21,18 +21,18 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\user_ldap\tests\mapping;
|
||||
namespace OCA\User_LDAP\Tests\Mapping;
|
||||
|
||||
use OCA\User_LDAP\Mapping\UserMapping;
|
||||
|
||||
/**
|
||||
* Class Test_UserMapping
|
||||
* Class UserMappingTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\user_ldap\tests\mapping
|
||||
* @package OCA\User_LDAP\Tests\Mapping
|
||||
*/
|
||||
class Test_UserMapping extends AbstractMappingTest {
|
||||
class UserMappingTest extends AbstractMappingTest {
|
||||
public function getMapper(\OCP\IDBConnection $dbMock) {
|
||||
return new UserMapping($dbMock);
|
||||
}
|
|
@ -32,7 +32,7 @@ use OCA\User_LDAP\User\Manager;
|
|||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\user_ldap\tests
|
||||
* @package OCA\User_LDAP\Tests\User
|
||||
*/
|
||||
class ManagerTest extends \Test\TestCase {
|
||||
|
||||
|
|
|
@ -28,11 +28,11 @@ use OCA\User_LDAP\User\User;
|
|||
use OCP\IUserManager;
|
||||
|
||||
/**
|
||||
* Class Test_User_User
|
||||
* Class UserTest
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\user_ldap\tests
|
||||
* @package OCA\User_LDAP\Tests\User
|
||||
*/
|
||||
class UserTest extends \Test\TestCase {
|
||||
|
||||
|
|
|
@ -23,21 +23,16 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace OCA\User_LDAP\tests;
|
||||
namespace OCA\User_LDAP\Tests;
|
||||
|
||||
use \OCA\User_LDAP\Wizard;
|
||||
|
||||
// use \OCA\User_LDAP\User_LDAP as UserLDAP;
|
||||
// use \OCA\User_LDAP\Access;
|
||||
// use \OCA\User_LDAP\Configuration;
|
||||
// use \OCA\User_LDAP\ILDAPWrapper;
|
||||
|
||||
/**
|
||||
* Class Test_Wizard
|
||||
*
|
||||
* @group DB
|
||||
*
|
||||
* @package OCA\User_LDAP\tests
|
||||
* @package OCA\User_LDAP\Tests
|
||||
*/
|
||||
class WizardTest extends \Test\TestCase {
|
||||
protected function setUp() {
|
||||
|
|
Loading…
Reference in New Issue