mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-28 02:43:32 +03:00
20 lines
476 B
PHP
20 lines
476 B
PHP
|
<?php
|
||
|
|
||
|
namespace Unit\Helper;
|
||
|
|
||
|
use PHPUnit\Framework\TestCase;
|
||
|
|
||
|
require_once __DIR__ . '/../../../application/helpers/validation_helper.php';
|
||
|
|
||
|
class ValidationHelperTest extends TestCase {
|
||
|
public function testValidateDateTimeReturnsTrueOnValidValue()
|
||
|
{
|
||
|
$this->assertTrue(validate_datetime(date('Y-m-d H:i:s')));
|
||
|
}
|
||
|
|
||
|
public function testValidateDateTimeReturnsFalseOnInvalidValue()
|
||
|
{
|
||
|
$this->assertFalse(validate_datetime('invalid'));
|
||
|
}
|
||
|
}
|