PMCORE-3674
This commit is contained in:
committed by
Paula.Quispe
parent
e79f5ac1cc
commit
8fbcb712e5
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\unit\workflow\engine\classes\PmFunctions;
|
||||
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use ProcessMaker\Model\Task;
|
||||
use Tests\TestCase;
|
||||
|
||||
/**
|
||||
* Test the PMFGetTaskUID() function
|
||||
*
|
||||
* @link https://wiki.processmaker.com/3.1/ProcessMaker_Functions#PMFGetTaskUID.28.29
|
||||
*/
|
||||
class PMFGetTaskUIDTest extends TestCase
|
||||
{
|
||||
use DatabaseTransactions;
|
||||
|
||||
/**
|
||||
* This tests if the "PMFGetTaskUID"
|
||||
* @test
|
||||
*/
|
||||
public function it_return_task_uid()
|
||||
{
|
||||
// Create task
|
||||
$table = factory(Task::class)->states('foreign_keys')->create();
|
||||
DB::commit();
|
||||
$result = PMFGetTaskUID($table->TAS_TITLE);
|
||||
$this->assertFalse($result);
|
||||
// When is empty
|
||||
$result = PMFGetTaskUID($table->TAS_TITLE, $table->PRO_UID);
|
||||
$this->assertNotEmpty($result);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user