fixes phpunit crashes
This commit is contained in:
committed by
Julio Cesar Laura Avendaño
parent
56b2a4f6dd
commit
7de170eea1
@@ -33,12 +33,10 @@ class WorkflowToolsTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function it_should_test_addAsyncOptionToSchedulerCommands_method()
|
public function it_should_test_addAsyncOptionToSchedulerCommands_method()
|
||||||
{
|
{
|
||||||
//to do: a valid workspace is required.
|
//method "WorkspaceTools::initPropel(true)" crashes all connections
|
||||||
if (!defined('HASH_INSTALLATION') || !defined('SYSTEM_HASH')) {
|
$message = "WorkspaceTools::initPropel(true) crashes all connections";
|
||||||
$message = "A workspace installation is required where the values HASH_INSTALLATION,"
|
|
||||||
. "SYSTEM_HASH, db.php exist and are correct.";
|
|
||||||
$this->markTestIncomplete($message);
|
$this->markTestIncomplete($message);
|
||||||
}
|
|
||||||
ob_start();
|
ob_start();
|
||||||
$this->workspaceTools->addAsyncOptionToSchedulerCommands(false);
|
$this->workspaceTools->addAsyncOptionToSchedulerCommands(false);
|
||||||
$string = ob_get_clean();
|
$string = ob_get_clean();
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ namespace Tests\unit\workflow\engine\src\ProcessMaker\TaskScheduler;
|
|||||||
use App\Jobs\TaskScheduler;
|
use App\Jobs\TaskScheduler;
|
||||||
use Faker\Factory;
|
use Faker\Factory;
|
||||||
use Illuminate\Support\Facades\Queue;
|
use Illuminate\Support\Facades\Queue;
|
||||||
|
use ProcessMaker\Model\Application;
|
||||||
|
use ProcessMaker\Model\AppThread;
|
||||||
|
use ProcessMaker\Model\Delegation;
|
||||||
use ProcessMaker\TaskScheduler\Task;
|
use ProcessMaker\TaskScheduler\Task;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
@@ -24,6 +27,9 @@ class TaskTest extends TestCase
|
|||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->faker = Factory::create();
|
$this->faker = Factory::create();
|
||||||
|
Delegation::truncate();
|
||||||
|
AppThread::truncate();
|
||||||
|
Application::truncate();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user