forked from extern/egroupware
Move tests into app/tests subdirectory (not app/inc/test or app/test)
This commit is contained in:
parent
4d4658e711
commit
237d81ce36
@ -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__.'/../../test/LoggedInTest.php');
|
require_once realpath(__DIR__.'/../../../tests/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__.'/../../test/WidgetBaseTest.php');
|
require_once realpath(__DIR__.'/../../tests/WidgetBaseTest.php');
|
||||||
|
|
||||||
use EGroupware\Api\Etemplate;
|
use EGroupware\Api\Etemplate;
|
||||||
use EGroupware\Api\DateTime;
|
use EGroupware\Api\DateTime;
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
namespace EGroupware\Api\Etemplate\Widget;
|
namespace EGroupware\Api\Etemplate\Widget;
|
||||||
|
|
||||||
require_once realpath(__DIR__.'/../../test/WidgetBaseTest.php');
|
require_once realpath(__DIR__.'/../../tests/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__.'/../../test/WidgetBaseTest.php');
|
require_once realpath(__DIR__.'/../../tests/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__.'/../../test/WidgetBaseTest.php');
|
require_once realpath(__DIR__.'/../../tests/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__.'/../../test/WidgetBaseTest.php');
|
require_once realpath(__DIR__.'/../../tests/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__.'/../../test/WidgetBaseTest.php');
|
require_once realpath(__DIR__.'/../../tests/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__.'/../../test/WidgetBaseTest.php');
|
require_once realpath(__DIR__.'/../../tests/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__.'/../../test/WidgetBaseTest.php');
|
require_once realpath(__DIR__.'/../../tests/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__.'/../../test/LoggedInTest.php');
|
require_once realpath(__DIR__.'/../../../tests/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';
|
@ -14,8 +14,6 @@
|
|||||||
|
|
||||||
namespace EGroupware\Api;
|
namespace EGroupware\Api;
|
||||||
|
|
||||||
require_once realpath(__DIR__.'/../loader/common.php'); // autoloader & check_load_extension
|
|
||||||
|
|
||||||
use EGroupware\Api;
|
use EGroupware\Api;
|
||||||
use PHPUnit\Framework\TestCase as TestCase;
|
use PHPUnit\Framework\TestCase as TestCase;
|
||||||
use ReflectionClass;
|
use ReflectionClass;
|
@ -11,8 +11,6 @@
|
|||||||
*/
|
*/
|
||||||
namespace EGroupware\Api;
|
namespace EGroupware\Api;
|
||||||
|
|
||||||
require_once realpath(__DIR__.'/../loader/common.php'); // autoloader & check_load_extension
|
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase as TestCase;
|
use PHPUnit\Framework\TestCase as TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
namespace EGroupware\Api;
|
namespace EGroupware\Api;
|
||||||
|
|
||||||
require_once realpath(__DIR__.'/../Etemplate/test/WidgetBaseTest.php');
|
require_once realpath(__DIR__.'/../src/Etemplate/tests/WidgetBaseTest.php');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test the main class of Etemplate
|
* Test the main class of Etemplate
|
@ -13,8 +13,6 @@
|
|||||||
|
|
||||||
namespace EGroupware\Api;
|
namespace EGroupware\Api;
|
||||||
|
|
||||||
require_once realpath(__DIR__.'/../loader/common.php'); // autoloader & check_load_extension
|
|
||||||
|
|
||||||
use EGroupware\Api\Framework;
|
use EGroupware\Api\Framework;
|
||||||
use PHPUnit\Framework\TestCase as TestCase;
|
use PHPUnit\Framework\TestCase as TestCase;
|
||||||
|
|
@ -14,8 +14,6 @@
|
|||||||
|
|
||||||
namespace EGroupware\Api;
|
namespace EGroupware\Api;
|
||||||
|
|
||||||
require_once realpath(__DIR__.'/../loader/common.php'); // autoloader & check_load_extension
|
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase as TestCase;
|
use PHPUnit\Framework\TestCase as TestCase;
|
||||||
use EGroupware\Api;
|
use EGroupware\Api;
|
||||||
|
|
||||||
@ -136,7 +134,7 @@ abstract class LoggedInTest extends TestCase
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
include(realpath(__DIR__ . '/../../../header.inc.php'));
|
include(realpath(__DIR__ . '/../../header.inc.php'));
|
||||||
}
|
}
|
||||||
catch (Exception $e)
|
catch (Exception $e)
|
||||||
{
|
{
|
||||||
@ -146,7 +144,7 @@ abstract class LoggedInTest extends TestCase
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once realpath(__DIR__.'/../loader/common.php'); // autoloader & check_load_extension
|
require_once realpath(__DIR__.'/../src/loader/common.php'); // autoloader & check_load_extension
|
||||||
|
|
||||||
// egw is normally created when a file is loaded using require_once
|
// egw is normally created when a file is loaded using require_once
|
||||||
if(empty($GLOBALS['egw']) || !is_a($GLOBALS['egw'], 'EGroupware\Api\Egw\Base'))
|
if(empty($GLOBALS['egw']) || !is_a($GLOBALS['egw'], 'EGroupware\Api\Egw\Base'))
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
namespace EGroupware\calendar;
|
namespace EGroupware\calendar;
|
||||||
|
|
||||||
require_once realpath(__DIR__.'/../../api/src/test/AppTest.php'); // Application test base
|
require_once realpath(__DIR__.'/../../api/tests/AppTest.php'); // Application test base
|
||||||
|
|
||||||
use Egroupware\Api;
|
use Egroupware\Api;
|
||||||
|
|
@ -12,21 +12,17 @@
|
|||||||
</php>
|
</php>
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="Api">
|
<testsuite name="Api">
|
||||||
|
<directory>../api/tests</directory>
|
||||||
<directory>../api/src/test/</directory>
|
<directory>../api/src/test/</directory>
|
||||||
<directory>../api/src/*/test/</directory>
|
<directory>../api/src/*/test/</directory>
|
||||||
<directory>../api/tests</directory>
|
|
||||||
</testsuite>
|
</testsuite>
|
||||||
<testsuite name="Etemplate">
|
<testsuite name="Etemplate">
|
||||||
<file>../api/src/test/EtemplateTest.php</file>
|
<file>../api/src/tests/EtemplateTest.php</file>
|
||||||
<directory>../api/src/Etemplate/test/</directory>
|
<directory>../api/src/Etemplate/tests/</directory>
|
||||||
<directory>../api/src/Etemplate/Widget/test/</directory>
|
<directory>../api/src/Etemplate/Widget/tests/</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
<testsuite name="Apps">
|
<testsuite name="Apps">
|
||||||
<!-- Apps with test directory -->
|
<!-- Apps with test directory -->
|
||||||
<directory>../*/test/</directory>
|
|
||||||
<!-- Apps with namespace -->
|
|
||||||
<directory>../*/src/test/</directory>
|
|
||||||
<directory>../*/src/*/test/</directory>
|
|
||||||
<directory>../*/tests/</directory>
|
<directory>../*/tests/</directory>
|
||||||
|
|
||||||
<exclude>../api</exclude>
|
<exclude>../api</exclude>
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
namespace EGroupware\Infolog;
|
namespace EGroupware\Infolog;
|
||||||
|
|
||||||
require_once realpath(__DIR__.'/../../api/src/test/AppTest.php'); // Application test base
|
require_once realpath(__DIR__.'/../../api/tests/AppTest.php'); // Application test base
|
||||||
|
|
||||||
use Egroupware\Api\Contacts;
|
use Egroupware\Api\Contacts;
|
||||||
|
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
namespace EGroupware\Infolog;
|
namespace EGroupware\Infolog;
|
||||||
|
|
||||||
require_once realpath(__DIR__.'/../../api/src/test/AppTest.php'); // Application test base
|
require_once realpath(__DIR__.'/../../api/tests/AppTest.php'); // Application test base
|
||||||
|
|
||||||
use Egroupware\Api;
|
use Egroupware\Api;
|
||||||
|
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
namespace EGroupware\Infolog;
|
namespace EGroupware\Infolog;
|
||||||
|
|
||||||
require_once realpath(__DIR__.'/../../api/src/test/AppTest.php'); // Application test base
|
require_once realpath(__DIR__.'/../../api/tests/AppTest.php'); // Application test base
|
||||||
|
|
||||||
use Egroupware\Api;
|
use Egroupware\Api;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user