2009-06-02 20:12:47 +00:00
|
|
|
<?php
|
|
|
|
|
2009-06-03 21:29:23 +00:00
|
|
|
require_once('PHPUnit/Framework.php');
|
|
|
|
require_once(dirname(__FILE__) . '/../classes/DailyImageWidget.php');
|
2009-06-02 20:12:47 +00:00
|
|
|
|
|
|
|
class DailyImageWidgetTest extends PHPUnit_Framework_TestCase {
|
2009-06-03 21:29:23 +00:00
|
|
|
function setUp() {
|
|
|
|
$this->diw = new DailyImageWidget();
|
|
|
|
}
|
|
|
|
|
|
|
|
function testRetrieveDataFailure() {
|
|
|
|
$this->diw->data = false;
|
|
|
|
|
|
|
|
ob_start();
|
|
|
|
$this->diw->render();
|
|
|
|
$result = ob_get_clean();
|
|
|
|
|
|
|
|
$this->assertTrue(empty($result));
|
|
|
|
}
|
2009-06-02 20:12:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|