From: Tim Otten Date: Sat, 15 Nov 2014 00:03:09 +0000 (-0800) Subject: CRM_Core_TransactionTest - Improve reporting of unplanned exceptions X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c0aa95b20dbb54970bc73eb1a2d74c9cfa0a5448;p=civicrm-core.git CRM_Core_TransactionTest - Improve reporting of unplanned exceptions --- diff --git a/tests/phpunit/CRM/Core/TransactionTest.php b/tests/phpunit/CRM/Core/TransactionTest.php index 7ac5d1379a..0c58d73a8a 100644 --- a/tests/phpunit/CRM/Core/TransactionTest.php +++ b/tests/phpunit/CRM/Core/TransactionTest.php @@ -255,9 +255,11 @@ class CRM_Core_TransactionTest extends CiviUnitTestCase { }); } catch (Exception $ex) { $e = $ex; + if (get_class($e) != 'Exception' || $e->getMessage() != 'Ruh-roh') { + throw $e; + } } $this->assertTrue($e instanceof Exception); - $this->assertEquals('Ruh-roh', $e->getMessage()); $this->assertContactsExistByOffset(array(0 => FALSE)); }