From c0aa95b20dbb54970bc73eb1a2d74c9cfa0a5448 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 14 Nov 2014 16:03:09 -0800 Subject: [PATCH] CRM_Core_TransactionTest - Improve reporting of unplanned exceptions --- tests/phpunit/CRM/Core/TransactionTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)); } -- 2.25.1