got console stuff working, fixed a bunch of typos/syntax errors/logic issues
This commit is contained in:
parent
c44ccb62b3
commit
aa4300375e
@ -18,6 +18,10 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
public function count() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
@ -18,6 +18,10 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
public function count() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
@ -18,6 +18,10 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
public function count() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
@ -16,6 +16,10 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
public function count() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
@ -18,7 +18,7 @@
|
||||
|
||||
public function run(array $listeners) {
|
||||
foreach ($listeners as $listener) {
|
||||
$listener->onBeforeTestCase($this);
|
||||
$listener->beforeTestCase($this);
|
||||
}
|
||||
|
||||
$result = new CombinedTestResult();
|
||||
@ -28,7 +28,7 @@
|
||||
}
|
||||
|
||||
foreach ($listeners as $listener) {
|
||||
$listener->onAfterTestCase($this);
|
||||
$listener->afterTestCase($this);
|
||||
}
|
||||
|
||||
return $result;
|
||||
@ -38,7 +38,7 @@
|
||||
$refClass = new ReflectionClass($this);
|
||||
$methods = array();
|
||||
foreach ($refClass->getMethods() as $method) {
|
||||
if (preg_match('/^[\*\s]*@test\s*$/m', $method->getDocBlock())) {
|
||||
if (preg_match('/^[\*\s]*@test\s*$/m', $method->getDocComment())) {
|
||||
$methods[] = $method;
|
||||
}
|
||||
}
|
||||
|
@ -23,6 +23,9 @@
|
||||
try {
|
||||
$this->method->invoke($this->testCase);
|
||||
$testPassed = true;
|
||||
foreach ($listeners as $listener) {
|
||||
$listener->onTestMethodPassed($this);
|
||||
}
|
||||
} catch (TestFailure $failure) {
|
||||
$this->handleTestFailure($failure);
|
||||
} catch (Exception $e) {
|
||||
@ -32,7 +35,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
$result = $this->createTestResult($this, $failure);
|
||||
$result = $this->createTestResult($failure);
|
||||
$this->testCase->tearDown();
|
||||
|
||||
foreach ($listeners as $listener) {
|
||||
|
@ -17,6 +17,7 @@
|
||||
);
|
||||
|
||||
$last = null;
|
||||
$switch = null;
|
||||
foreach ($args as $arg) {
|
||||
if (strpos($arg, '-') === 0) {
|
||||
$last = (substr($arg, 0, 2) === '--') ? substr($arg, 2) : substr($arg, 1);
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
$testClass = new $testClass($testClass);
|
||||
if ($testClass instanceof Testable) {
|
||||
$tests[] = $testClasse;
|
||||
$tests[] = $testClass;
|
||||
}
|
||||
} else if (is_dir($arg)) {
|
||||
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($arg)) as $file) {
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
$testClass = new $testClass($testClass);
|
||||
if ($testClass instanceof Testable) {
|
||||
$tests[] = $testClasse;
|
||||
$tests[] = $testClass;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user