diff --git a/classes/DailyImageWidget.php b/classes/DailyImageWidget.php index 29eefe2..c4f237e 100644 --- a/classes/DailyImageWidget.php +++ b/classes/DailyImageWidget.php @@ -1,7 +1,10 @@ data)) { + } + } } ?> \ No newline at end of file diff --git a/daily-image-widget.php b/daily-image-widget.php new file mode 100644 index 0000000..b8d1812 --- /dev/null +++ b/daily-image-widget.php @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/test/DailyImageWidgetTest.php b/test/DailyImageWidgetTest.php index ee86c54..1dee143 100644 --- a/test/DailyImageWidgetTest.php +++ b/test/DailyImageWidgetTest.php @@ -1,9 +1,22 @@ diw = new DailyImageWidget(); + } + + function testRetrieveDataFailure() { + $this->diw->data = false; + + ob_start(); + $this->diw->render(); + $result = ob_get_clean(); + + $this->assertTrue(empty($result)); + } } ?> \ No newline at end of file