feat: initial commit

Basic functionality and tests and all that.
This commit is contained in:
Josh Sherman 2020-05-12 22:28:19 -05:00
commit 69c4a24301
No known key found for this signature in database
GPG key ID: 55B058A80530EF22
10 changed files with 307 additions and 0 deletions

20
tests/RandomDateTest.php Normal file
View file

@ -0,0 +1,20 @@
<?php
require_once './src/RandomDate.php';
if (
!class_exists('\PHPUnit_Framework_TestCase')
&& class_exists('\PHPUnit\Framework\TestCase')
) {
class_alias('\PHPUnit\Framework\TestCase', '\PHPUnit_Framework_TestCase');
}
class RandomDateTest extends PHPUnit_Framework_TestCase
{
public function testDate()
{
$rd = new joshtronic\RandomDate();
$this->assertRegExp('/^[0-9]{4}(-[0-9]{2}){2}$/i', $rd->date('Y-m-d'));
}
}