From cca552c32c2abd7c39584d2a0bf2863e9ea0a303 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Wed, 3 Jun 2009 17:29:23 -0400 Subject: [PATCH] start writing code --- classes/DailyImageWidget.php | 5 ++++- daily-image-widget.php | 7 +++++++ test/DailyImageWidgetTest.php | 17 +++++++++++++++-- 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 daily-image-widget.php 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