Merged in bugfix/PMC-1074 (pull request #7109)
PMC-1074 Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
committed by
Julio Cesar Laura Avendaño
commit
50a78cfe85
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace Tests\unit\workflow\engine\src\ProcessMaker\Importer;
|
namespace Tests\unit\workflow\engine\src\ProcessMaker\Importer;
|
||||||
|
|
||||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
|
||||||
use ProcessMaker\Importer\Importer;
|
use ProcessMaker\Importer\Importer;
|
||||||
use ProcessMaker\Model\BpmnProject;
|
use ProcessMaker\Model\BpmnProject;
|
||||||
use ProcessMaker\Model\Process;
|
use ProcessMaker\Model\Process;
|
||||||
@@ -11,15 +10,37 @@ use Tests\TestCase;
|
|||||||
|
|
||||||
class ImporterTest extends TestCase
|
class ImporterTest extends TestCase
|
||||||
{
|
{
|
||||||
use DatabaseTransactions;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Declared to avoid the incompatibility exception
|
* Declared to avoid the incompatibility exception
|
||||||
*/
|
*/
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
$this->markTestIncomplete();//@todo: Please correct this unit test
|
parent::setUp();
|
||||||
error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);
|
error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);
|
||||||
|
config(["system.workspace" => "test"]);
|
||||||
|
$workspace = config("system.workspace");
|
||||||
|
|
||||||
|
if (!file_exists(PATH_DB . $workspace)) {
|
||||||
|
mkdir(PATH_DB . $workspace);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!file_exists(PATH_DB . $workspace . PATH_SEP . "db.php")) {
|
||||||
|
$myfile = fopen(PATH_DB . $workspace . PATH_SEP . "db.php", "w");
|
||||||
|
fwrite($myfile, "<?php
|
||||||
|
define ('DB_ADAPTER', 'mysql' );
|
||||||
|
define ('DB_HOST', '" . env('DB_HOST') . "' );
|
||||||
|
define ('DB_NAME', '" . env('DB_DATABASE') . "' );
|
||||||
|
define ('DB_USER', '" . env('DB_USERNAME') . "' );
|
||||||
|
define ('DB_PASS', '" . env('DB_PASSWORD') . "' );
|
||||||
|
define ('DB_RBAC_HOST', '" . env('DB_HOST') . "' );
|
||||||
|
define ('DB_RBAC_NAME', '" . env('DB_DATABASE') . "' );
|
||||||
|
define ('DB_RBAC_USER', '" . env('DB_USERNAME') . "' );
|
||||||
|
define ('DB_RBAC_PASS', '" . env('DB_PASSWORD') . "' );
|
||||||
|
define ('DB_REPORT_HOST', '" . env('DB_HOST') . "' );
|
||||||
|
define ('DB_REPORT_NAME', '" . env('DB_DATABASE') . "' );
|
||||||
|
define ('DB_REPORT_USER', '" . env('DB_USERNAME') . "' );
|
||||||
|
define ('DB_REPORT_PASS', '" . env('DB_PASSWORD') . "' );");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user