2022-03-02 11:59:29 -04:00
|
|
|
<?php
|
|
|
|
|
|
2022-07-21 00:04:21 -04:00
|
|
|
namespace Tests\unit\workflow\engine\classes\PmFunctions;
|
2022-03-02 11:59:29 -04:00
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
|
|
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
|
use ProcessMaker\Model\Application;
|
|
|
|
|
use ProcessMaker\Model\Delegation;
|
|
|
|
|
use Tests\TestCase;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Test the PMFNewCase() function
|
|
|
|
|
*
|
|
|
|
|
* @link https://wiki.processmaker.com/3.1/ProcessMaker_Functions#PMFNewCase.28.29
|
|
|
|
|
*/
|
|
|
|
|
class PMFNewCaseTest extends TestCase
|
|
|
|
|
{
|
|
|
|
|
use DatabaseTransactions;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* It tests the PMFNewCaseTest() function with the default parameters
|
|
|
|
|
*
|
|
|
|
|
* @test
|
|
|
|
|
*/
|
|
|
|
|
public function it_should_test_this_pmfunction_default_parameters()
|
|
|
|
|
{
|
2022-07-21 00:04:21 -04:00
|
|
|
$table = Delegation::factory()->foreign_keys()->create();
|
2022-03-02 11:59:29 -04:00
|
|
|
// Force commit for propel
|
|
|
|
|
DB::commit();
|
|
|
|
|
$result = PMFNewCase($table->PRO_UID, $table->USR_UID, $table->TAS_UID, [], null);
|
|
|
|
|
$this->assertEquals(0, $result);
|
|
|
|
|
}
|
|
|
|
|
}
|