1<?php 2 3namespace dokuwiki\plugin\swarmwebhook\test; 4 5/** 6 * General tests for the swarmwebhook plugin 7 * 8 * @group plugin_swarmwebhook 9 * @group plugins 10 */ 11class IFTTTparseTime extends \DokuWikiTest 12{ 13 /** @var array alway enable the needed plugins */ 14 protected $pluginsEnabled = ['swarmwebhook']; 15 16 public function test_parseTimeIntoTimestamp() 17 { 18 $IFTTT = new mock\IFTTT(); 19 20 $actualDateTime = $IFTTT->parseTimeIntoDateTime('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}