phpunit cleanups
This commit is contained in:
parent
83c30c1e53
commit
ad64a7b349
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,3 +1,6 @@
|
||||
.DS_Store
|
||||
*~
|
||||
|
||||
.settings
|
||||
.project
|
||||
.buildpath
|
||||
coverage
|
||||
|
@ -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
6
phpunit.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit colors="true">
|
||||
<php>
|
||||
<ini name="error_reporting" value="30719" />
|
||||
</php>
|
||||
</phpunit>
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user