From: Tim Otten Date: Tue, 26 Mar 2013 02:49:13 +0000 (-0400) Subject: CRM-12146 - Dial back errors produced by testByID_get() X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b07a3bf94a91363eacedc73bbdd750dca265e062;hp=4a97890c4826317e1a108ea888cb273dc0a86081;p=civicrm-core.git CRM-12146 - Dial back errors produced by testByID_get() --- diff --git a/tests/phpunit/api/v3/SyntaxConformanceAllEntitiesTest.php b/tests/phpunit/api/v3/SyntaxConformanceAllEntitiesTest.php index 2cad16fbc8..0c04625993 100644 --- a/tests/phpunit/api/v3/SyntaxConformanceAllEntitiesTest.php +++ b/tests/phpunit/api/v3/SyntaxConformanceAllEntitiesTest.php @@ -143,6 +143,20 @@ class api_v3_SyntaxConformanceAllEntitiesTest extends CiviUnitTestCase { } return $entities; } + + public static function toBeSkipped_automock($sequential = FALSE) { + $entitiesWithoutGet = array('Participant', 'ParticipantPayment', 'Setting', 'SurveyRespondant', 'MailingRecipients', 'CustomSearch', 'Extension', 'ReportTemplate', 'System'); + if ($sequential === TRUE) { + return $entitiesWithoutGet; + } + $entities = array(); + foreach ($entitiesWithoutGet as $e) { + $entities[] = array($e); + } + return $entities; + } + + /* * At this stage exclude the ones that don't pass & add them as we can troubleshoot them */ @@ -404,7 +418,8 @@ class api_v3_SyntaxConformanceAllEntitiesTest extends CiviUnitTestCase { * Currency - only seems to support US */ public function testByID_get($entityName) { - if (in_array($entityName, $this->toBeImplemented['create'])) { + printf("consider %s\n", $entityName); + if (in_array($entityName, self::toBeSkipped_automock(TRUE))) { // $this->markTestIncomplete("civicrm_api3_{$Entity}_create to be implemented"); return; }