Move all tests under api/src into api/tests

This commit is contained in:
nathangray 2017-10-23 10:14:14 +02:00
parent 3c096b3466
commit b8f8a014fa
14 changed files with 14 additions and 16 deletions

View File

@ -18,7 +18,7 @@ use EGroupware\Api\Db;
use EGroupware\Api\Db\Schema; use EGroupware\Api\Db\Schema;
// test base providing Egw environment // 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 // For security reasons we exit by default if called via the webserver
if (php_sapi_name() !== 'cli') if (php_sapi_name() !== 'cli')

View File

@ -13,7 +13,7 @@
namespace EGroupware\Api\Etemplate\Widget; 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\Etemplate;
use EGroupware\Api\DateTime; use EGroupware\Api\DateTime;

View File

@ -12,7 +12,7 @@
namespace EGroupware\Api\Etemplate\Widget; 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\Etemplate;

View File

@ -12,7 +12,7 @@
namespace EGroupware\Api\Etemplate\Widget; 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\Etemplate;

View File

@ -12,7 +12,7 @@
namespace EGroupware\Api\Etemplate\Widget; 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\Etemplate;

View File

@ -13,7 +13,7 @@
namespace EGroupware\Api\Etemplate\Widget; namespace EGroupware\Api\Etemplate\Widget;
require_once realpath(__DIR__.'/../../tests/WidgetBaseTest.php'); require_once realpath(__DIR__.'/../WidgetBaseTest.php');
/** /**
* Description of TemplateTest * Description of TemplateTest

View File

@ -13,7 +13,7 @@
namespace EGroupware\Api\Etemplate\Widget; 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\Etemplate;

View File

@ -13,7 +13,7 @@
namespace EGroupware\Api\Etemplate\Widget; 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\Etemplate;

View File

@ -13,7 +13,7 @@
namespace EGroupware\Api\Etemplate\Widget; 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\Etemplate;

View File

@ -15,7 +15,7 @@ namespace EGroupware\Api\Etemplate;
use Egroupware\Api\Etemplate; use Egroupware\Api\Etemplate;
// test base providing Egw environment, since we need the DB // 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 // 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'; \EGroupware\Api\Etemplate\Request::$request_class = 'EGroupware\Api\Etemplate\Request\Session';

View File

@ -12,7 +12,7 @@
namespace EGroupware\Api; 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 * Test the main class of Etemplate

View File

@ -14,8 +14,6 @@
namespace EGroupware\Api\Mail; namespace EGroupware\Api\Mail;
require_once realpath(__DIR__.'/../../loader/common.php'); // autoloader & check_load_extension
use EGroupware\Api; use EGroupware\Api;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use ReflectionClass; use ReflectionClass;

View File

@ -11,10 +11,10 @@
*/ */
namespace EGroupware\Api; 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 // 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; use PHPUnit\Framework\TestCase as TestCase;