mirror of
https://github.com/simshaun/recurr.git
synced 2025-01-17 16:08:14 +01:00
Add transformer DTEND test
This commit is contained in:
parent
62a547c9f0
commit
335240a213
@ -36,6 +36,22 @@ class RuleTransformerTest extends RuleTransformerBase
|
||||
$this->assertEquals(new \DateTime('2016-03-16 04:00:00'), $computed[2]);
|
||||
}
|
||||
|
||||
public function testDtend()
|
||||
{
|
||||
$rule = new Rule(
|
||||
'FREQ=YEARLY;DTEND=20160316T040000',
|
||||
new \DateTime('2014-03-16 04:00:00')
|
||||
);
|
||||
|
||||
$this->transformer->setRule($rule);
|
||||
$computed = $this->transformer->getComputedArray();
|
||||
|
||||
$this->assertCount(3, $computed);
|
||||
$this->assertEquals(new \DateTime('2014-03-16 04:00:00'), $computed[0]);
|
||||
$this->assertEquals(new \DateTime('2015-03-16 04:00:00'), $computed[1]);
|
||||
$this->assertEquals(new \DateTime('2016-03-16 04:00:00'), $computed[2]);
|
||||
}
|
||||
|
||||
public function testRfc2445Example()
|
||||
{
|
||||
$rule = new Rule(
|
||||
|
Loading…
x
Reference in New Issue
Block a user