PMCORE-3674

This commit is contained in:
Paula Quispe
2022-03-02 11:59:29 -04:00
committed by Paula.Quispe
parent e79f5ac1cc
commit 8fbcb712e5
49 changed files with 1797 additions and 377 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace Tests\unit\workflow\engine\classes\PmFunctions;
use Tests\TestCase;
/**
* Test the orderGrid() function
*
* @link https://wiki.processmaker.com/3.1/ProcessMaker_Functions#generateCode.28.29
*/
class OrderGridTest extends TestCase
{
/**
* This tests the "orderGrid"
* @test
*/
public function it_test_order_grid()
{
$grid = [];
$grid[1]['NAME'] = 'Jhon';
$grid[1]['AGE'] = 27;
$grid[2]['NAME'] = 'Louis';
$grid[2]['AGE'] = 5;
$result = orderGrid($grid, 'AGE', 'ASC');
$this->assertNotEmpty($result);
$result = orderGrid($result, 'AGE', 'DESC');
$this->assertNotEmpty($result);
}
}