feat: initial commit
Basic functionality and tests and all that.
This commit is contained in:
commit
69c4a24301
10 changed files with 307 additions and 0 deletions
20
tests/RandomDateTest.php
Normal file
20
tests/RandomDateTest.php
Normal 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'));
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue