mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
Move all tests under api/src into api/tests
This commit is contained in:
parent
3c096b3466
commit
b8f8a014fa
@ -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')
|
@ -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;
|
||||||
@ -83,7 +83,7 @@ class DateTest extends \EGroupware\Api\Etemplate\WidgetBaseTest
|
|||||||
|
|
||||||
$time = new DateTime('1970-01-01',new \DateTimeZone('UTC'));
|
$time = new DateTime('1970-01-01',new \DateTimeZone('UTC'));
|
||||||
$time->setTime(22, 13, 20); // Just because 80000 seconds after epoch is 22:13:20
|
$time->setTime(22, 13, 20); // Just because 80000 seconds after epoch is 22:13:20
|
||||||
|
|
||||||
$data = array(
|
$data = array(
|
||||||
array(
|
array(
|
||||||
array('date' => $today->getTimestamp(), 'date_time' => $today->getTimestamp()),
|
array('date' => $today->getTimestamp(), 'date_time' => $today->getTimestamp()),
|
@ -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;
|
||||||
|
|
@ -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;
|
||||||
|
|
@ -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;
|
||||||
|
|
@ -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
|
@ -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;
|
||||||
|
|
@ -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;
|
||||||
|
|
@ -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;
|
||||||
|
|
@ -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';
|
@ -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
|
||||||
|
@ -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;
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user