This repository has been archived on 2024-01-26. You can view files and clone it, but cannot push or open issues or pull requests.
RelativeDateParser/tests/RelativeDateType1Test.php

19 lines
519 B
PHP
Raw Permalink Normal View History

2014-09-30 07:06:16 +02:00
<?php
use enko\RelativeDateParser\RelativeDateParser;
class RelativeDateType1Test extends PHPUnit_Framework_TestCase
{
public function testNextDate()
{
$now = new DateTime('2014-07-07');
$next_date = new DateTime('2014-08-12');
/** @var RelativeDateParser $parser */
$parser = new RelativeDateParser('Zweiter Dienstag des Monats', $now, 'de');
// Assert
$this->assertEquals($next_date->format('c'), $parser->getNext()->format('c'));
}
}