summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/tests
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2016-07-25 10:58:03 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2016-07-25 11:05:59 +0200
commit686cb599b61ccad8cd8b0bf23d6870a56313f0eb (patch)
treed49110103aa3412df1385d5417710fe2b362b568 /apps/user_ldap/tests
parenta20f4c432b0cee0b968b1c8c3514d1e798f574ef (diff)
downloadnextcloud-server-686cb599b61ccad8cd8b0bf23d6870a56313f0eb.tar.gz
nextcloud-server-686cb599b61ccad8cd8b0bf23d6870a56313f0eb.zip
fix autoloading in LPAP integration tests, resolves #544
Diffstat (limited to 'apps/user_ldap/tests')
-rw-r--r--apps/user_ldap/tests/Integration/Bootstrap.php26
-rw-r--r--apps/user_ldap/tests/Integration/Lib/IntegrationTestAccessGroupsMatchFilter.php4
-rw-r--r--apps/user_ldap/tests/Integration/Lib/IntegrationTestBackupServer.php3
-rw-r--r--apps/user_ldap/tests/Integration/Lib/IntegrationTestBatchApplyUserAttributes.php3
-rw-r--r--apps/user_ldap/tests/Integration/Lib/IntegrationTestConnect.php3
-rw-r--r--apps/user_ldap/tests/Integration/Lib/IntegrationTestCountUsersByLoginName.php3
-rw-r--r--apps/user_ldap/tests/Integration/Lib/IntegrationTestFetchUsersByLoginName.php3
-rw-r--r--apps/user_ldap/tests/Integration/Lib/IntegrationTestPaging.php3
-rw-r--r--apps/user_ldap/tests/Integration/Lib/IntegrationTestUserHome.php3
-rw-r--r--apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserAvatar.php3
-rw-r--r--apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserDisplayName.php3
11 files changed, 36 insertions, 21 deletions
diff --git a/apps/user_ldap/tests/Integration/Bootstrap.php b/apps/user_ldap/tests/Integration/Bootstrap.php
new file mode 100644
index 00000000000..f52f1322171
--- /dev/null
+++ b/apps/user_ldap/tests/Integration/Bootstrap.php
@@ -0,0 +1,26 @@
+<?php
+
+/**
+ * @copyright Copyright (c) 2016 Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @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/>
+ *
+ */
+
+define('CLI_TEST_RUN', true);
+require_once __DIR__ . '/../../../../lib/base.php';
+require_once __DIR__ . '/setup-scripts/config.php';
diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestAccessGroupsMatchFilter.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestAccessGroupsMatchFilter.php
index 4fcc8334338..2411a46d8ee 100644
--- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestAccessGroupsMatchFilter.php
+++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestAccessGroupsMatchFilter.php
@@ -23,10 +23,9 @@
namespace OCA\User_LDAP\Tests\Integration\Lib;
-
use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest;
-require_once __DIR__ . '/../../../../../lib/base.php';
+require_once __DIR__ . '/../Bootstrap.php';
class IntegrationTestAccessGroupsMatchFilter extends AbstractIntegrationTest {
@@ -118,7 +117,6 @@ class IntegrationTestAccessGroupsMatchFilter extends AbstractIntegrationTest {
}
}
-require_once(__DIR__ . '/../setup-scripts/config.php');
$test = new IntegrationTestAccessGroupsMatchFilter($host, $port, $adn, $apwd, $bdn);
$test->init();
$test->run();
diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestBackupServer.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestBackupServer.php
index 1d4bd05b8a5..f433930bd26 100644
--- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestBackupServer.php
+++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestBackupServer.php
@@ -27,7 +27,7 @@ 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';
+require_once __DIR__ . '/../Bootstrap.php';
class IntegrationTestBackupServer extends AbstractIntegrationTest {
/** @var UserMapping */
@@ -113,7 +113,6 @@ class IntegrationTestBackupServer extends AbstractIntegrationTest {
}
}
-require_once(__DIR__ . '/../setup-scripts/config.php');
$test = new IntegrationTestBackupServer($host, $port, $adn, $apwd, $bdn);
$test->init();
$test->run();
diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestBatchApplyUserAttributes.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestBatchApplyUserAttributes.php
index 2574877fca4..89ce764e51a 100644
--- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestBatchApplyUserAttributes.php
+++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestBatchApplyUserAttributes.php
@@ -26,7 +26,7 @@ namespace OCA\User_LDAP\Tests\Integration\Lib;
use OCA\User_LDAP\Mapping\UserMapping;
use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest;
-require_once __DIR__ . '/../../../../../lib/base.php';
+require_once __DIR__ . '/../Bootstrap.php';
class IntegrationTestBatchApplyUserAttributes extends AbstractIntegrationTest {
/**
@@ -68,7 +68,6 @@ class IntegrationTestBatchApplyUserAttributes extends AbstractIntegrationTest {
}
-require_once(__DIR__ . '/../setup-scripts/config.php');
$test = new IntegrationTestBatchApplyUserAttributes($host, $port, $adn, $apwd, $bdn);
$test->init();
$test->run();
diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestConnect.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestConnect.php
index 85a185c8ac6..44b16aed6a1 100644
--- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestConnect.php
+++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestConnect.php
@@ -27,7 +27,7 @@ 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';
+require_once __DIR__ . '/../Bootstrap.php';
class IntegrationTestConnect extends AbstractIntegrationTest {
/** @var UserMapping */
@@ -161,7 +161,6 @@ class IntegrationTestConnect extends AbstractIntegrationTest {
}
}
-require_once(__DIR__ . '/../setup-scripts/config.php');
$test = new IntegrationTestConnect($host, $port, $adn, $apwd, $bdn);
$test->init();
$test->run();
diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestCountUsersByLoginName.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestCountUsersByLoginName.php
index 4d20d52595e..eb4a0a5c9cf 100644
--- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestCountUsersByLoginName.php
+++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestCountUsersByLoginName.php
@@ -25,7 +25,7 @@ namespace OCA\User_LDAP\Tests\Integration\Lib;
use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest;
-require_once __DIR__ . '/../../../../../lib/base.php';
+require_once __DIR__ . '/../Bootstrap.php';
class IntegrationTestCountUsersByLoginName extends AbstractIntegrationTest {
@@ -61,7 +61,6 @@ class IntegrationTestCountUsersByLoginName extends AbstractIntegrationTest {
}
}
-require_once(__DIR__ . '/../setup-scripts/config.php');
$test = new IntegrationTestCountUsersByLoginName($host, $port, $adn, $apwd, $bdn);
$test->init();
$test->run();
diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestFetchUsersByLoginName.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestFetchUsersByLoginName.php
index 56f44cc58b2..32fc2151a7c 100644
--- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestFetchUsersByLoginName.php
+++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestFetchUsersByLoginName.php
@@ -27,7 +27,7 @@ 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';
+require_once __DIR__ . '/../Bootstrap.php';
class IntegrationTestFetchUsersByLoginName extends AbstractIntegrationTest {
/** @var UserMapping */
@@ -74,7 +74,6 @@ class IntegrationTestFetchUsersByLoginName extends AbstractIntegrationTest {
}
-require_once(__DIR__ . '/../setup-scripts/config.php');
$test = new IntegrationTestFetchUsersByLoginName($host, $port, $adn, $apwd, $bdn);
$test->init();
$test->run();
diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestPaging.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestPaging.php
index 7acd49af00a..3826cbdae51 100644
--- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestPaging.php
+++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestPaging.php
@@ -27,7 +27,7 @@ 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';
+require_once __DIR__ . '/../Bootstrap.php';
class IntegrationTestPaging extends AbstractIntegrationTest {
/** @var UserMapping */
@@ -76,7 +76,6 @@ class IntegrationTestPaging extends AbstractIntegrationTest {
}
}
-require_once(__DIR__ . '/../setup-scripts/config.php');
$test = new IntegrationTestPaging($host, $port, $adn, $apwd, $bdn);
$test->init();
$test->run();
diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestUserHome.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestUserHome.php
index a4db8cae681..95c14ca8947 100644
--- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestUserHome.php
+++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestUserHome.php
@@ -28,7 +28,7 @@ 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';
+require_once __DIR__ . '/../Bootstrap.php';
class IntegrationTestUserHome extends AbstractIntegrationTest {
/** @var UserMapping */
@@ -169,7 +169,6 @@ class IntegrationTestUserHome extends AbstractIntegrationTest {
}
}
-require_once(__DIR__ . '/../setup-scripts/config.php');
$test = new IntegrationTestUserHome($host, $port, $adn, $apwd, $bdn);
$test->init();
$test->run();
diff --git a/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserAvatar.php b/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserAvatar.php
index bd4da5ea97f..7c8f9475b41 100644
--- a/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserAvatar.php
+++ b/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserAvatar.php
@@ -29,7 +29,7 @@ use OCA\User_LDAP\User\User;
use OCA\User_LDAP\Mapping\UserMapping;
use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest;
-require_once __DIR__ . '/../../../../../../lib/base.php';
+require_once __DIR__ . '/../../Bootstrap.php';
class IntegrationTestUserAvatar extends AbstractIntegrationTest {
/** @var UserMapping */
@@ -148,7 +148,6 @@ class IntegrationTestUserAvatar extends AbstractIntegrationTest {
}
}
-require_once(__DIR__ . '/../../setup-scripts/config.php');
$test = new IntegrationTestUserAvatar($host, $port, $adn, $apwd, $bdn);
$test->init();
$test->run();
diff --git a/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserDisplayName.php b/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserDisplayName.php
index de86e17d014..ab0d2ffdcce 100644
--- a/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserDisplayName.php
+++ b/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserDisplayName.php
@@ -26,7 +26,7 @@ namespace OCA\User_LDAP\Tests\Integration\Lib\User;
use OCA\User_LDAP\Mapping\UserMapping;
use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest;
-require_once __DIR__ . '/../../../../../../lib/base.php';
+require_once __DIR__ . '/../../Bootstrap.php';
class IntegrationTestUserDisplayName extends AbstractIntegrationTest {
/** @var UserMapping */
@@ -100,7 +100,6 @@ class IntegrationTestUserDisplayName extends AbstractIntegrationTest {
}
}
-require_once(__DIR__ . '/../../setup-scripts/config.php');
$test = new IntegrationTestUserDisplayName($host, $port, $adn, $apwd, $bdn);
$test->init();
$test->run();