mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-28 17:42:27 +03:00
Add ValidationHelperTest.php
This commit is contained in:
parent
5b4bc63314
commit
c1fe38d076
1 changed files with 19 additions and 0 deletions
19
tests/Unit/Helper/ValidationHelperTest.php
Normal file
19
tests/Unit/Helper/ValidationHelperTest.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?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'));
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue