From 91387828c988aca83ab15625c8dab0f3a59a2630 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 1 May 2017 20:12:32 -0700 Subject: [PATCH] CRM-20316 - Fix "New Mailing" regression. Update tests. `testWithoutParam_create()` asserts that *generally* you need to provide some params to create a record. This was true for Mailings in <=4.7.18 because `create_id` was required. The main goal of a98504a72 was to make `created_id` optional, which actually meant that *no data* would be required (making `testWithoutParam_create()` non-applicable/inaccurate. (This was obscured at the time because a98504a72 simultaneously made `subject` mandatory, but that led to the regression in "New Mailing". Since neither `created_id` nor `subject` is required... there's nothing left to be required. The correct behavior is to skip `testWithoutParam_create()` for mailings.) --- tests/phpunit/api/v3/SyntaxConformanceTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/phpunit/api/v3/SyntaxConformanceTest.php b/tests/phpunit/api/v3/SyntaxConformanceTest.php index f560d2c98e..7c040f616b 100644 --- a/tests/phpunit/api/v3/SyntaxConformanceTest.php +++ b/tests/phpunit/api/v3/SyntaxConformanceTest.php @@ -1081,6 +1081,9 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { if ($Entity === 'Setting') { $this->markTestSkipped('It seems OK for setting to skip here as it silently sips invalid params'); } + elseif ($Entity === 'Mailing') { + $this->markTestSkipped('It seems OK for "Mailing" to skip here because you can create empty drafts'); + } // should create php complaining that a param is missing civicrm_api3($Entity, 'Create'); } -- 2.25.1