From 15b2e873b2a0528d2d994f2b174dc37ff2582717 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 19 May 2015 11:27:56 +0200 Subject: [PATCH] Drop the DateTimeFactoryTest refs #6778 --- .../Icinga/Util/DateTimeFactoryTest.php | 69 ------------------- 1 file changed, 69 deletions(-) delete mode 100644 test/php/library/Icinga/Util/DateTimeFactoryTest.php diff --git a/test/php/library/Icinga/Util/DateTimeFactoryTest.php b/test/php/library/Icinga/Util/DateTimeFactoryTest.php deleted file mode 100644 index 2e8e097eb..000000000 --- a/test/php/library/Icinga/Util/DateTimeFactoryTest.php +++ /dev/null @@ -1,69 +0,0 @@ - 'invalid')); - } - - public function testWhetherParseWorksWithASpecificTimezone() - { - $dt = DateTimeFactory::parse('17-04-14 17:00', 'd-m-y H:i', new DateTimeZone('Europe/Berlin')); - $dt->setTimezone(new DateTimeZone('UTC')); - - $this->assertEquals( - '15', - $dt->format('H'), - 'DateTimeFactory::parse does not properly parse a given datetime or does not respect the given timezone' - ); - } - - public function testWhetherParseWorksWithoutASpecificTimezone() - { - $this->assertEquals( - '15', - DateTimeFactory::parse('17-04-14 15:00', 'd-m-y H:i')->format('H'), - 'DateTimeFactory::parse does not properly parse a given datetime' - ); - } - - public function testWhetherCreateWorksWithASpecificTimezone() - { - $dt = DateTimeFactory::create('2014-04-17 5PM', new DateTimeZone('Europe/Berlin')); - $dt->setTimezone(new DateTimeZone('UTC')); - - $this->assertEquals( - '15', - $dt->format('H'), - 'DateTimeFactory::create does not properly parse a given datetime or does not respect the given timezone' - ); - } - - public function testWhetherCreateWorksWithoutASpecificTimezone() - { - $this->assertEquals( - '15', - DateTimeFactory::create('2014-04-17 3PM')->format('H'), - 'DateTimeFactory::create does not properly parse a given datetime' - ); - } -}