phpunit cleanups

This commit is contained in:
John Bintz 2009-12-21 16:36:57 -05:00
parent 83c30c1e53
commit ad64a7b349
4 changed files with 103 additions and 93 deletions

5
.gitignore vendored
View File

@ -1,3 +1,6 @@
.DS_Store
*~
.settings
.project
.buildpath
coverage

View File

@ -4,6 +4,8 @@
* Show a HubbleSite daily image as a widget.
*/
class DailyImageWidget {
var $display_options = array();
/**
* Initialize the widget.
* For unit testing purposes, you can disable remote data loading by passing true to this function.
@ -143,7 +145,7 @@ class DailyImageWidget {
* Render the widget.
* @param array $args The theme's widget layout arguments.
*/
function render($args) {
function render($args = array()) {
if (!empty($this->data) && is_array($this->data)) {
extract($args);
$options = $this->get_display_options();

6
phpunit.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit colors="true">
<php>
<ini name="error_reporting" value="30719" />
</php>
</phpunit>

View File

@ -1,9 +1,8 @@
<?php
error_reporting(E_STRICT);
require_once('PHPUnit/Framework.php');
require_once(dirname(__FILE__) . '/../classes/DailyImageWidget.php');
require_once(dirname(__FILE__) . '/../../mockpress/mockpress.php');
require_once('MockPress/mockpress.php');
class DailyImageWidgetTest extends PHPUnit_Framework_TestCase {
function setUp() {