From 5b3957baca54e5210fa88f4325e5aa8bdf64bbca Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 19 May 2015 12:46:33 +0200 Subject: [PATCH] Drop the DateTimeRendererTest refs #6778 --- .../Icinga/Web/View/DateTimeRendererTest.php | 101 ------------------ 1 file changed, 101 deletions(-) delete mode 100644 test/php/library/Icinga/Web/View/DateTimeRendererTest.php diff --git a/test/php/library/Icinga/Web/View/DateTimeRendererTest.php b/test/php/library/Icinga/Web/View/DateTimeRendererTest.php deleted file mode 100644 index 279c18ba1..000000000 --- a/test/php/library/Icinga/Web/View/DateTimeRendererTest.php +++ /dev/null @@ -1,101 +0,0 @@ -assertInstanceOf( - 'Icinga\Web\View\DateTimeRenderer', - $dt, - 'Dashboard::create() could not create DateTimeRenderer' - ); - } - - /** - * @depends testWhetherCreateCreatesDateTimeRenderer - */ - public function testWhetherIsDateTimeReturnsRightType() - { - $dateTime = new DateTime('+1 day'); - $dt = DateTimeRenderer::create($dateTime); - - $this->assertTrue( - $dt->isDateTime(), - 'Dashboard::isDateTime() returns wrong type' - ); - } - - /** - * @depends testWhetherCreateCreatesDateTimeRenderer - */ - public function testWhetherIsTimeReturnsRightType() - { - $dateTime = new DateTime('+1 hour'); - $dt = DateTimeRenderer::create($dateTime); - - $this->assertTrue( - $dt->isTime(), - 'Dashboard::isTime() returns wrong type' - ); - } - - /** - * @depends testWhetherCreateCreatesDateTimeRenderer - */ - public function testWhetherIsTimespanReturnsRightType() - { - $dateTime = new DateTime('+1 minute'); - $dt = DateTimeRenderer::create($dateTime); - - $this->assertTrue( - $dt->isTimespan(), - 'Dashboard::isTimespan() returns wrong type' - ); - } - - /** - * @depends testWhetherCreateCreatesDateTimeRenderer - */ - public function testWhetherNormalizeReturnsNormalizedDateTime() - { - $dateTime = time(); - $dt = DateTimeRenderer::normalize($dateTime); - - $this->assertInstanceOf( - 'DateTime', - $dt, - 'Dashboard::normalize() returns wrong instance' - ); - } - - /** - * @depends testWhetherCreateCreatesDateTimeRenderer - */ - public function testWhetherRenderReturnsRightText() - { - $dateTime = new DateTime('+1 minute'); - $dt = DateTimeRenderer::create($dateTime); - - $text = $dt->render( - '#1 The service is down since %s', - '#2 The service is down since %s o\'clock.', - '#3 The service is down for %s.' - ); - - $this->assertRegExp( - '/#3/', - $text, - 'Dashboard::render() returns wrong text' - ); - } -}