diff --git a/api/src/Db/tests/SchemaTest.php b/api/tests/Db/SchemaTest.php similarity index 96% rename from api/src/Db/tests/SchemaTest.php rename to api/tests/Db/SchemaTest.php index 8303078ee7..e8131ade51 100644 --- a/api/src/Db/tests/SchemaTest.php +++ b/api/tests/Db/SchemaTest.php @@ -18,7 +18,7 @@ use EGroupware\Api\Db; use EGroupware\Api\Db\Schema; // test base providing Egw environment -require_once realpath(__DIR__.'/../../../tests/LoggedInTest.php'); +require_once realpath(__DIR__.'/../LoggedInTest.php'); // For security reasons we exit by default if called via the webserver if (php_sapi_name() !== 'cli') diff --git a/api/src/Etemplate/Widget/tests/DateTest.php b/api/tests/Etemplate/Widget/DateTest.php similarity index 99% rename from api/src/Etemplate/Widget/tests/DateTest.php rename to api/tests/Etemplate/Widget/DateTest.php index 114586d352..3528385e34 100644 --- a/api/src/Etemplate/Widget/tests/DateTest.php +++ b/api/tests/Etemplate/Widget/DateTest.php @@ -13,7 +13,7 @@ namespace EGroupware\Api\Etemplate\Widget; -require_once realpath(__DIR__.'/../../tests/WidgetBaseTest.php'); +require_once realpath(__DIR__.'/../WidgetBaseTest.php'); use EGroupware\Api\Etemplate; use EGroupware\Api\DateTime; @@ -83,7 +83,7 @@ class DateTest extends \EGroupware\Api\Etemplate\WidgetBaseTest $time = new DateTime('1970-01-01',new \DateTimeZone('UTC')); $time->setTime(22, 13, 20); // Just because 80000 seconds after epoch is 22:13:20 - + $data = array( array( array('date' => $today->getTimestamp(), 'date_time' => $today->getTimestamp()), diff --git a/api/src/Etemplate/Widget/tests/FloatTest.php b/api/tests/Etemplate/Widget/FloatTest.php similarity index 98% rename from api/src/Etemplate/Widget/tests/FloatTest.php rename to api/tests/Etemplate/Widget/FloatTest.php index 4dc9cc45a2..b57140b54b 100644 --- a/api/src/Etemplate/Widget/tests/FloatTest.php +++ b/api/tests/Etemplate/Widget/FloatTest.php @@ -12,7 +12,7 @@ namespace EGroupware\Api\Etemplate\Widget; -require_once realpath(__DIR__.'/../../tests/WidgetBaseTest.php'); +require_once realpath(__DIR__.'/../WidgetBaseTest.php'); use EGroupware\Api\Etemplate; diff --git a/api/src/Etemplate/Widget/tests/IntegerTest.php b/api/tests/Etemplate/Widget/IntegerTest.php similarity index 98% rename from api/src/Etemplate/Widget/tests/IntegerTest.php rename to api/tests/Etemplate/Widget/IntegerTest.php index 214041d568..fff392d304 100644 --- a/api/src/Etemplate/Widget/tests/IntegerTest.php +++ b/api/tests/Etemplate/Widget/IntegerTest.php @@ -12,7 +12,7 @@ namespace EGroupware\Api\Etemplate\Widget; -require_once realpath(__DIR__.'/../../tests/WidgetBaseTest.php'); +require_once realpath(__DIR__.'/../WidgetBaseTest.php'); use EGroupware\Api\Etemplate; diff --git a/api/src/Etemplate/Widget/tests/SelectTest.php b/api/tests/Etemplate/Widget/SelectTest.php similarity index 98% rename from api/src/Etemplate/Widget/tests/SelectTest.php rename to api/tests/Etemplate/Widget/SelectTest.php index 99d41f22cc..685d75706f 100644 --- a/api/src/Etemplate/Widget/tests/SelectTest.php +++ b/api/tests/Etemplate/Widget/SelectTest.php @@ -12,7 +12,7 @@ namespace EGroupware\Api\Etemplate\Widget; -require_once realpath(__DIR__.'/../../tests/WidgetBaseTest.php'); +require_once realpath(__DIR__.'/../WidgetBaseTest.php'); use EGroupware\Api\Etemplate; diff --git a/api/src/Etemplate/Widget/tests/TemplateTest.php b/api/tests/Etemplate/Widget/TemplateTest.php similarity index 96% rename from api/src/Etemplate/Widget/tests/TemplateTest.php rename to api/tests/Etemplate/Widget/TemplateTest.php index 5d0e9260de..d5029d1e5a 100644 --- a/api/src/Etemplate/Widget/tests/TemplateTest.php +++ b/api/tests/Etemplate/Widget/TemplateTest.php @@ -13,7 +13,7 @@ namespace EGroupware\Api\Etemplate\Widget; -require_once realpath(__DIR__.'/../../tests/WidgetBaseTest.php'); +require_once realpath(__DIR__.'/../WidgetBaseTest.php'); /** * Description of TemplateTest diff --git a/api/src/Etemplate/Widget/tests/TextboxTest.php b/api/tests/Etemplate/Widget/TextboxTest.php similarity index 98% rename from api/src/Etemplate/Widget/tests/TextboxTest.php rename to api/tests/Etemplate/Widget/TextboxTest.php index a55b930dfa..45c993b565 100644 --- a/api/src/Etemplate/Widget/tests/TextboxTest.php +++ b/api/tests/Etemplate/Widget/TextboxTest.php @@ -13,7 +13,7 @@ namespace EGroupware\Api\Etemplate\Widget; -require_once realpath(__DIR__.'/../../tests/WidgetBaseTest.php'); +require_once realpath(__DIR__.'/../WidgetBaseTest.php'); use EGroupware\Api\Etemplate; diff --git a/api/src/Etemplate/Widget/tests/UrlEmailTest.php b/api/tests/Etemplate/Widget/UrlEmailTest.php similarity index 98% rename from api/src/Etemplate/Widget/tests/UrlEmailTest.php rename to api/tests/Etemplate/Widget/UrlEmailTest.php index 8286ba4d28..5048c6d4f8 100644 --- a/api/src/Etemplate/Widget/tests/UrlEmailTest.php +++ b/api/tests/Etemplate/Widget/UrlEmailTest.php @@ -13,7 +13,7 @@ namespace EGroupware\Api\Etemplate\Widget; -require_once realpath(__DIR__.'/../../tests/WidgetBaseTest.php'); +require_once realpath(__DIR__.'/../WidgetBaseTest.php'); use EGroupware\Api\Etemplate; diff --git a/api/src/Etemplate/Widget/tests/UrlTest.php b/api/tests/Etemplate/Widget/UrlTest.php similarity index 98% rename from api/src/Etemplate/Widget/tests/UrlTest.php rename to api/tests/Etemplate/Widget/UrlTest.php index 8ba5bca652..9989857fd3 100644 --- a/api/src/Etemplate/Widget/tests/UrlTest.php +++ b/api/tests/Etemplate/Widget/UrlTest.php @@ -13,7 +13,7 @@ namespace EGroupware\Api\Etemplate\Widget; -require_once realpath(__DIR__.'/../../tests/WidgetBaseTest.php'); +require_once realpath(__DIR__.'/../WidgetBaseTest.php'); use EGroupware\Api\Etemplate; diff --git a/api/src/Etemplate/tests/WidgetBaseTest.php b/api/tests/Etemplate/WidgetBaseTest.php similarity index 99% rename from api/src/Etemplate/tests/WidgetBaseTest.php rename to api/tests/Etemplate/WidgetBaseTest.php index d24d37ed75..4866824f0b 100644 --- a/api/src/Etemplate/tests/WidgetBaseTest.php +++ b/api/tests/Etemplate/WidgetBaseTest.php @@ -15,7 +15,7 @@ namespace EGroupware\Api\Etemplate; use Egroupware\Api\Etemplate; // test base providing Egw environment, since we need the DB -require_once realpath(__DIR__.'/../../../tests/LoggedInTest.php'); +require_once realpath(__DIR__.'/../LoggedInTest.php'); // Store request in the session, file access probably won't work due to permissions \EGroupware\Api\Etemplate\Request::$request_class = 'EGroupware\Api\Etemplate\Request\Session'; diff --git a/api/src/Etemplate/tests/WidgetTest.php b/api/tests/Etemplate/WidgetTest.php similarity index 100% rename from api/src/Etemplate/tests/WidgetTest.php rename to api/tests/Etemplate/WidgetTest.php diff --git a/api/tests/EtemplateTest.php b/api/tests/EtemplateTest.php index f45b32fe9a..8d24172cae 100644 --- a/api/tests/EtemplateTest.php +++ b/api/tests/EtemplateTest.php @@ -12,7 +12,7 @@ namespace EGroupware\Api; -require_once realpath(__DIR__.'/../src/Etemplate/tests/WidgetBaseTest.php'); +require_once realpath(__DIR__.'/Etemplate/WidgetBaseTest.php'); /** * Test the main class of Etemplate diff --git a/api/src/Mail/tests/CredentialsTest.php b/api/tests/Mail/CredentialsTest.php similarity index 97% rename from api/src/Mail/tests/CredentialsTest.php rename to api/tests/Mail/CredentialsTest.php index 7c0d62872c..a511b805bd 100644 --- a/api/src/Mail/tests/CredentialsTest.php +++ b/api/tests/Mail/CredentialsTest.php @@ -14,8 +14,6 @@ namespace EGroupware\Api\Mail; -require_once realpath(__DIR__.'/../../loader/common.php'); // autoloader & check_load_extension - use EGroupware\Api; use PHPUnit\Framework\TestCase; use ReflectionClass; diff --git a/api/src/loader/tests/SecurityTest.php b/api/tests/loader/SecurityTest.php similarity index 97% rename from api/src/loader/tests/SecurityTest.php rename to api/tests/loader/SecurityTest.php index d45949f892..628496f9fc 100644 --- a/api/src/loader/tests/SecurityTest.php +++ b/api/tests/loader/SecurityTest.php @@ -11,10 +11,10 @@ */ namespace EGroupware\Api; -require_once realpath(__DIR__.'/../common.php'); // autoloader & check_load_extension +require_once realpath(__DIR__.'/../../src/loader/common.php'); // autoloader & check_load_extension // // We're testing security.php -require_once realpath(__DIR__.'/../security.php'); +require_once realpath(__DIR__.'/../../src/loader/security.php'); use PHPUnit\Framework\TestCase as TestCase;