From d79593c83d89f88a741908aaec349c27acde1dee Mon Sep 17 00:00:00 2001 From: Andrea Adamczyk Date: Mon, 21 Oct 2019 16:30:21 -0400 Subject: [PATCH] PMC-1074 --- .../ProcessMaker/Importer/ImporterTest.php | 29 ++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Importer/ImporterTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Importer/ImporterTest.php index e3ddaffe7..c10fe7500 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Importer/ImporterTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Importer/ImporterTest.php @@ -2,7 +2,6 @@ namespace Tests\unit\workflow\engine\src\ProcessMaker\Importer; -use Illuminate\Foundation\Testing\DatabaseTransactions; use ProcessMaker\Importer\Importer; use ProcessMaker\Model\BpmnProject; use ProcessMaker\Model\Process; @@ -11,15 +10,37 @@ use Tests\TestCase; class ImporterTest extends TestCase { - use DatabaseTransactions; - /** * Declared to avoid the incompatibility exception */ public function setUp() { - $this->markTestIncomplete();//@todo: Please correct this unit test + parent::setUp(); 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, "