minor cleanup
This commit is contained in:
parent
905f796b4c
commit
c5bd2c372a
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user