Files
luos/tests/unit/workflow/engine/classes/PmFunctions/PMFNewCaseImpersonateTest.php

33 lines
935 B
PHP
Raw Normal View History

2022-03-02 11:59:29 -04:00
<?php
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 PMFNewCaseImpersonate() function
*
* @link https://wiki.processmaker.com/3.1/ProcessMaker_Functions#PMFNewCaseImpersonate.28.29
*/
class PMFNewCaseImpersonateTest extends TestCase
{
use DatabaseTransactions;
/**
* It tests the PMFNewCaseImpersonateTest() function with the default parameters
*
* @test
*/
public function it_should_test_this_pmfunction_default_parameters()
{
$table = Delegation::factory()->foreign_keys()->create();
2022-03-02 11:59:29 -04:00
// Force commit for propel
DB::commit();
$result = PMFNewCaseImpersonate($table->PRO_UID, $table->USR_UID, [], '');
$this->assertEquals(0, $result);
}
}