phpunit cleanups
This commit is contained in:
parent
83c30c1e53
commit
ad64a7b349
|
@ -1,3 +1,6 @@
|
||||||
.DS_Store
|
.DS_Store
|
||||||
*~
|
*~
|
||||||
|
.settings
|
||||||
|
.project
|
||||||
|
.buildpath
|
||||||
|
coverage
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
* Show a HubbleSite daily image as a widget.
|
* Show a HubbleSite daily image as a widget.
|
||||||
*/
|
*/
|
||||||
class DailyImageWidget {
|
class DailyImageWidget {
|
||||||
|
var $display_options = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the widget.
|
* Initialize the widget.
|
||||||
* For unit testing purposes, you can disable remote data loading by passing true to this function.
|
* 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.
|
* Render the widget.
|
||||||
* @param array $args The theme's widget layout arguments.
|
* @param array $args The theme's widget layout arguments.
|
||||||
*/
|
*/
|
||||||
function render($args) {
|
function render($args = array()) {
|
||||||
if (!empty($this->data) && is_array($this->data)) {
|
if (!empty($this->data) && is_array($this->data)) {
|
||||||
extract($args);
|
extract($args);
|
||||||
$options = $this->get_display_options();
|
$options = $this->get_display_options();
|
||||||
|
|
|
@ -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
|
<?php
|
||||||
|
|
||||||
error_reporting(E_STRICT);
|
|
||||||
require_once('PHPUnit/Framework.php');
|
require_once('PHPUnit/Framework.php');
|
||||||
require_once(dirname(__FILE__) . '/../classes/DailyImageWidget.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 {
|
class DailyImageWidgetTest extends PHPUnit_Framework_TestCase {
|
||||||
function setUp() {
|
function setUp() {
|
||||||
|
|
Loading…
Reference in New Issue