From c8597b2d3bc532afa5794388cf36a9c7aa180e95 Mon Sep 17 00:00:00 2001 From: eileen Date: Thu, 6 Jun 2019 18:40:56 +1200 Subject: [PATCH] Remove without param tests These really date back to when we were creating the api wrapper. I don't think they add much value now - esp since php is not quiet if we break the wrapper contract --- .../phpunit/api/v3/SyntaxConformanceTest.php | 44 ------------------- 1 file changed, 44 deletions(-) diff --git a/tests/phpunit/api/v3/SyntaxConformanceTest.php b/tests/phpunit/api/v3/SyntaxConformanceTest.php index 301c0fb594..2e4a415eef 100644 --- a/tests/phpunit/api/v3/SyntaxConformanceTest.php +++ b/tests/phpunit/api/v3/SyntaxConformanceTest.php @@ -782,28 +782,6 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { $this->assertRegExp('/API (.*) does not exist/', $result['error_message']); } - /** - * @dataProvider entities - * @param $Entity - */ - public function testWithoutParam_get($Entity) { - // should get php complaining that a param is missing - try { - $result = civicrm_api($Entity, 'Get'); - $this->fail('Expected an exception. No exception was thrown.'); - } - // As of php7.1 a new Exception is thrown by PHP ArgumentCountError when not enough params are passed. - catch (ArgumentCountError $e) { - /* ok */ - } - catch (PHPUnit\Framework\Error $e) { - /* ok */ - } - catch (PHPUnit_Framework_Error $e) { - /* ok */ - } - } - /** * @dataProvider entities * @param $Entity @@ -1594,28 +1572,6 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { $this->assertContains(strtolower("API ($Entity, Delete) does not exist"), strtolower($result['error_message'])); } - /** - * @dataProvider entities - * @param $Entity - */ - public function testWithoutParam_delete($Entity) { - // should delete php complaining that a param is missing - try { - $result = civicrm_api($Entity, 'Delete'); - $this->fail('Expected an exception. No exception was thrown.'); - } - // As of php7.1 a new Exception is thrown by PHP ArgumentCountError when not enough params are passed. - catch (ArgumentCountError $e) { - /* ok */ - } - catch (PHPUnit\Framework\Error $e) { - /* ok */ - } - catch (PHPUnit_Framework_Error $e) { - /* ok */ - } - } - /** * @dataProvider entities_delete * @param $Entity -- 2.25.1