* [MOD] Moved test files to avoid weird issues with permissions when performing unit tests

This commit is contained in:
nuxsmin
2018-07-23 13:43:52 +02:00
committed by Rubén D
parent e9ee4f43de
commit fdac95ca97
72 changed files with 7 additions and 16 deletions

View File

@@ -42,7 +42,7 @@
"SP\\": "lib/SP/",
"SP\\Modules\\Web\\": "app/modules/web/",
"SP\\Modules\\Api\\": "app/modules/api/",
"SP\\Test\\": "test"
"SP\\Test\\": "test/SP/"
}
},
"config": {

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="./test/bootstrap.php"
bootstrap="./test/SP/bootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
@@ -10,9 +10,7 @@
stopOnFailure="false">
<testsuites>
<testsuite name="Unit">
<directory suffix=".php">./test</directory>
<exclude>./test/res</exclude>
<exclude>./test/tmp</exclude>
<directory suffix=".php">./test/SP</directory>
</testsuite>
</testsuites>
<filter>
@@ -20,12 +18,4 @@
<directory suffix=".php">./lib</directory>
</whitelist>
</filter>
<!--<php>-->
<!--<env name="APP_ENV" value="testing"/>-->
<!--<env name="BCRYPT_ROUNDS" value="4"/>-->
<!--<env name="CACHE_DRIVER" value="array"/>-->
<!--<env name="SESSION_DRIVER" value="array"/>-->
<!--<env name="QUEUE_DRIVER" value="sync"/>-->
<!--<env name="MAIL_DRIVER" value="array"/>-->
<!--</php>-->
</phpunit>

View File

@@ -1,5 +1,5 @@
var $jscomp={scope:{},findInternal:function(b,d,f){b instanceof String&&(b=String(b));for(var g=b.length,a=0;a<g;a++){var c=b[a];if(d.call(f,c,a,b))return{i:a,v:c}}return{i:-1,v:void 0}}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(b,d,f){if(f.get||f.set)throw new TypeError("ES3 does not support getters and setters.");b!=Array.prototype&&b!=Object.prototype&&(b[d]=f.value)};
$jscomp.getGlobal=function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(b,d,f,g){if(d){f=$jscomp.global;b=b.split(".");for(g=0;g<b.length-1;g++){var a=b[g];a in f||(f[a]={});f=f[a]}b=b[b.length-1];g=f[b];d=d(g);d!=g&&null!=d&&$jscomp.defineProperty(f,b,{configurable:!0,writable:!0,value:d})}};
$jscomp.getGlobal=function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global&&null!=global?global:b};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(b,d,f,g){if(d){f=$jscomp.global;b=b.split(".");for(g=0;g<b.length-1;g++){var a=b[g];a in f||(f[a]={});f=f[a]}b=b[b.length-1];g=f[b];d=d(g);d!=g&&null!=d&&$jscomp.defineProperty(f,b,{configurable:!0,writable:!0,value:d})}};
$jscomp.polyfill("Array.prototype.find",function(b){return b?b:function(b,f){return $jscomp.findInternal(this,b,f).v}},"es6-impl","es3");
sysPass.Triggers=function(b){var d=b.log,f=function(a){var c={valueField:"id",labelField:"name",searchField:["name"]};a.find(".select-box").each(function(a){var d=$(this);a={};!0===d.data("create")&&(a.create=!0);c.plugins=d.hasClass("select-box-deselect")?{clear_selection:{title:b.config().LANG[51]}}:{};if(d.data("onchange")){var e=d.data("onchange").split("/");c.onChange=function(a){if(0<a)if(2===e.length)sysPassApp.actions()[e[0]][e[1]](d);else sysPassApp.actions()[e[0]](d)}}d.selectize($.extend(a,
c))});a.find("#allowed_exts").selectize({create:function(a){return{value:a.toUpperCase(),text:a.toUpperCase()}},createFilter:/^[a-z0-9]{1,4}$/i,plugins:["remove_button"]});a.find("#wikifilter").selectize({create:!0,createFilter:/^[a-z0-9:._-]+$/i,plugins:["remove_button"]});a.find(".select-items-tag").selectize({create:function(a){return{value:a.toLowerCase(),text:a.toLowerCase()}},createFilter:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/,

View File

@@ -34,8 +34,8 @@ use SP\Storage\Database\DatabaseConnectionData;
define('APP_MODULE', 'tests');
define('APP_ROOT', dirname(__DIR__));
define('TEST_ROOT', APP_ROOT . DIRECTORY_SEPARATOR . 'test');
define('APP_ROOT', dirname(__DIR__, 2));
define('TEST_ROOT', dirname(__DIR__));
define('SQL_PATH', APP_ROOT . DIRECTORY_SEPARATOR . 'schemas');
define('RESOURCE_DIR', TEST_ROOT . DIRECTORY_SEPARATOR . 'res');
define('TMP_DIR', TEST_ROOT . DIRECTORY_SEPARATOR . 'tmp');
@@ -51,6 +51,7 @@ require APP_ROOT . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autol
require APP_ROOT . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'BaseFunctions.php';
print 'APP_ROOT=' . APP_ROOT . PHP_EOL;
print 'TEST_ROOT=' . TEST_ROOT . PHP_EOL;
// Setup directories
if (!is_dir(TMP_DIR)) {