Ensure the check in assertAPIFailure is based on the expected error message.
authorMattias Michaux <mattias.michaux@gmail.com>
Mon, 16 May 2016 19:25:41 +0000 (21:25 +0200)
committerMattias Michaux <mattias.michaux@gmail.com>
Mon, 16 May 2016 19:36:31 +0000 (21:36 +0200)
tests/phpunit/CiviTest/CiviUnitTestCase.php

index a74bca2c973cf464e645a674f3582e20d402c921..2bff8498a8322b082ac2e5a7f5069e872dcfe600 100644 (file)
@@ -968,7 +968,7 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase {
       );
     }
     $result = $this->civicrm_api($entity, $action, $params);
-    $this->assertAPIFailure($result, "We expected a failure for $entity $action but got a success");
+    $this->assertAPIFailure($result, "We expected a failure for $entity $action but got a success", $expectedErrorMessage);
     return $result;
   }