From b07a3bf94a91363eacedc73bbdd750dca265e062 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 25 Mar 2013 22:49:13 -0400 Subject: [PATCH] CRM-12146 - Dial back errors produced by testByID_get() --- .../api/v3/SyntaxConformanceAllEntitiesTest.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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; } -- 2.25.1