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;
// 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')

View File

@ -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()),

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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';

View File

@ -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

View File

@ -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;

View File

@ -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;