Permalink
Browse files

Couple more changes to reflect the new tests added in #536.

  • Loading branch information...
1 parent d4ae2a6 commit 6fc47ce13364e0580016d23c847f094971d45e23 @gwoo gwoo committed Jul 6, 2012
Showing with 10 additions and 5 deletions.
  1. +1 −1 tests/cases/console/command/TestTest.php
  2. +9 −4 tests/cases/test/DispatcherTest.php
@@ -148,7 +148,7 @@ public function testRunMultipleTestsWithAbsolutePath() {
$path = LITHIUM_LIBRARY_PATH . '/lithium/tests/mocks/test/cases';
$command->run($path);
- $expected = "1 / 1 pass\n0 fails and 2 exceptions\n";
+ $expected = "4 exceptions";
$expected = preg_quote($expected, '/');
$result = $command->response->output;
$this->assertPattern("/{$expected}/", $result);
@@ -15,6 +15,8 @@
use lithium\tests\mocks\test\cases\MockTest;
use lithium\tests\mocks\test\cases\MockTestErrorHandling;
use lithium\tests\mocks\test\cases\MockSkipThrowsException;
+use lithium\tests\mocks\test\cases\MockSetUpThrowsException;
+use lithium\tests\mocks\test\cases\MockTearDownThrowsException;
class DispatcherTest extends \lithium\test\Unit {
@@ -62,17 +64,20 @@ public function testRunGroupWithString() {
$this->assertEqual($expected, $result);
$expected = new Collection(array('data' => array(
- new MockSkipThrowsException(), new MockTest(), new MockTestErrorHandling()
+ new MockSetUpThrowsException(),
+ new MockSkipThrowsException(),
+ new MockTearDownThrowsException(),
+ new MockTest(),
+ new MockTestErrorHandling()
)));
$result = $report->group->tests();
$this->assertEqual($expected, $result);
-
$expected = 'testNothing';
- $result = $report->results['group'][1][0]['method'];
+ $result = $report->results['group'][3][0]['method'];
$this->assertEqual($expected, $result);
$expected = 'pass';
- $result = $report->results['group'][1][0]['result'];
+ $result = $report->results['group'][3][0]['result'];
$this->assertEqual($expected, $result);
}
}

0 comments on commit 6fc47ce

Please sign in to comment.