Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/381499 )

Change subject: Fix a couple base test case things
......................................................................

Fix a couple base test case things

Oops, if you weren't printing the watchdog logs on failed tests,
it was pretending everything passed.

Change-Id: Ie31a5692b7dfac6bd9923830e558672b224878b6
---
M sites/all/modules/wmf_common/tests/includes/BaseWmfDrupalPhpUnitTestCase.php
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/99/381499/1

diff --git 
a/sites/all/modules/wmf_common/tests/includes/BaseWmfDrupalPhpUnitTestCase.php 
b/sites/all/modules/wmf_common/tests/includes/BaseWmfDrupalPhpUnitTestCase.php
index 09a9a38..1d8b8ed 100644
--- 
a/sites/all/modules/wmf_common/tests/includes/BaseWmfDrupalPhpUnitTestCase.php
+++ 
b/sites/all/modules/wmf_common/tests/includes/BaseWmfDrupalPhpUnitTestCase.php
@@ -2,6 +2,7 @@
 
 use SmashPig\Core\Context;
 use SmashPig\Tests\TestingContext;
+use SmashPig\Tests\TestingDatabase;
 use SmashPig\Tests\TestingGlobalConfiguration;
 
 class BaseWmfDrupalPhpUnitTestCase extends PHPUnit_Framework_TestCase {
@@ -31,6 +32,7 @@
     }
 
     public function tearDown() {
+               TestingDatabase::clearStatics();
                Context::set( null ); // Nullify any SmashPig context for the 
next run
                parent::tearDown();
        }
@@ -199,7 +201,7 @@
 
   public function onNotSuccessfulTest( $e ) {
     if ( !PRINT_WATCHDOG_ON_TEST_FAIL ) {
-      return;
+      throw $e;
        }
     $output = "\nWatchdog messages:\n";
 

-- 
To view, visit https://gerrit.wikimedia.org/r/381499
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie31a5692b7dfac6bd9923830e558672b224878b6
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to