Files
luos/tests/unit/workflow/engine/classes/PmFunctions/FormatDateTest.php
Paula Quispe 8fbcb712e5 PMCORE-3674
2022-04-27 12:48:00 -04:00

35 lines
690 B
PHP

<?php
namespace Tests\unit\workflow\engine\classes\PmFunctions;
use Exception;
use Tests\TestCase;
/**
* Test the formatDate() function
*
* @link https://wiki.processmaker.com/3.1/ProcessMaker_Functions#formatDate.28.29
*/
class FormatDateTest extends TestCase
{
/**
* This tests the "formatDate"
* @test
*/
public function it_get_format_date()
{
$result = formatDate(date('Y-m-d'), 'yyyy-mm-dd');
$this->assertNotEmpty($result);
}
/**
* This tests the "formatDate"
* @test
*/
public function it_get_exceptions()
{
$this->expectException(Exception::class);
$result = formatDate('');
}
}