Completed
Push — develop ( 53f27d...7115f3 )
by Michael
01:50
created

IFTTTparseTime   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A test_parseTimeIntoTimestamp() 0 8 1
1
<?php
2
3
namespace dokuwiki\plugin\swarmzapierstructwebhook\test;
4
5
/**
6
 * General tests for the swarmzapierstructwebhook plugin
7
 *
8
 * @group plugin_swarmzapierstructwebhook
9
 * @group plugins
10
 */
11
class IFTTTparseTime extends \DokuWikiTest
12
{
13
    /** @var array alway enable the needed plugins */
14
    protected $pluginsEnabled = ['swarmzapierstructwebhook'];
15
16
    public function test_parseTimeIntoTimestamp()
17
    {
18
        $IFTTT = new mock\IFTTT();
19
20
        $actualDateTime = $IFTTT->parseTimeIntoTimestamp('May 24, 2018 at 06:02PM', '1527178045');
21
22
        $this->assertEquals('2018-05-24', $actualDateTime->format('Y-m-d'));
23
        $this->assertEquals('2018-05-24T18:02:00+02:00', $actualDateTime->format(\DateTime::ATOM));
24
    }
25
}