minor cleanup

This commit is contained in:
tmont 2009-06-13 19:50:26 +00:00
parent 905f796b4c
commit c5bd2c372a
2 changed files with 2 additions and 4 deletions

View File

@ -1,6 +1,6 @@
<?php <?php
class TestMethod implements Testable { /* internal */ class TestMethod implements Testable {
protected $testCase; protected $testCase;
protected $method; protected $method;
@ -15,14 +15,12 @@
$listener->beforeTestMethod($this); $listener->beforeTestMethod($this);
} }
$testPassed = false;
$result = null; $result = null;
$failure = null; $failure = null;
$this->testCase->setUp(); $this->testCase->setUp();
try { try {
$this->method->invoke($this->testCase); $this->method->invoke($this->testCase);
$testPassed = true;
foreach ($listeners as $listener) { foreach ($listeners as $listener) {
$listener->onTestMethodPassed($this); $listener->onTestMethodPassed($this);
} }

View File

@ -5,7 +5,7 @@
protected $tests; protected $tests;
protected $listeners; protected $listeners;
public function __construct(array $tests, array $listeners = array()) { public function __construct(array $tests = array(), array $listeners = array()) {
$this->tests = $tests; $this->tests = $tests;
$this->listeners = $listeners; $this->listeners = $listeners;
} }