From: Eileen McNaughton Date: Mon, 12 Jan 2015 22:34:57 +0000 (+1300) Subject: phpdoc fixes X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1e1fdcf636a5d49df8833bc3433a081c341095ee;p=civicrm-core.git phpdoc fixes --- diff --git a/tests/phpunit/CRM/Contact/BAO/GroupContactCacheTest.php b/tests/phpunit/CRM/Contact/BAO/GroupContactCacheTest.php index 76561d3ede..a9374611ac 100644 --- a/tests/phpunit/CRM/Contact/BAO/GroupContactCacheTest.php +++ b/tests/phpunit/CRM/Contact/BAO/GroupContactCacheTest.php @@ -219,6 +219,10 @@ class CRM_Contact_BAO_GroupContactCacheTest extends CiviUnitTestCase { * created entities and provides for brainless clenaup. * * @see CRM_Core_DAO::createTestObject + * @param $daoName + * @param array $params + * @param int $numObjects + * @param bool $createOnly */ function createTestObject($daoName, $params = array(), $numObjects = 1, $createOnly = FALSE) { $objects = CRM_Core_DAO::createTestObject($daoName, $params, $numObjects, $createOnly); diff --git a/tests/phpunit/CRM/Contact/BAO/QueryTest.php b/tests/phpunit/CRM/Contact/BAO/QueryTest.php index 0e240b3500..d96bc27c5a 100644 --- a/tests/phpunit/CRM/Contact/BAO/QueryTest.php +++ b/tests/phpunit/CRM/Contact/BAO/QueryTest.php @@ -33,6 +33,10 @@ class CRM_Contact_BAO_QueryTest extends CiviUnitTestCase { /** * Test CRM_Contact_BAO_Query::searchQuery() * @dataProvider dataProvider + * @param $fv + * @param $count + * @param $ids + * @param $full */ public function testSearch($fv, $count, $ids, $full) { $op = new PHPUnit_Extensions_Database_Operation_Insert(); diff --git a/tests/phpunit/CRM/Contact/Form/Search/Custom/GroupTest.php b/tests/phpunit/CRM/Contact/Form/Search/Custom/GroupTest.php index e76b78e8cd..e24db3a3aa 100644 --- a/tests/phpunit/CRM/Contact/Form/Search/Custom/GroupTest.php +++ b/tests/phpunit/CRM/Contact/Form/Search/Custom/GroupTest.php @@ -82,6 +82,11 @@ class CRM_Contact_Form_Search_Custom_GroupTest extends CiviUnitTestCase { /** * Test CRM_Contact_Form_Search_Custom_Group::count() * @dataProvider dataProvider + * @param $fv + * @param $count + * @param $ids + * @param $full + * @throws \Exception */ public function testCount($fv, $count, $ids, $full) { $this->foreignKeyChecksOff(); @@ -114,6 +119,11 @@ class CRM_Contact_Form_Search_Custom_GroupTest extends CiviUnitTestCase { /** * Test CRM_Contact_Form_Search_Custom_Group::all() * @dataProvider dataProvider + * @param $fv + * @param $count + * @param $ids + * @param $full + * @throws \Exception */ public function testAll($fv, $count, $ids, $full) { // Truncate affected tables @@ -145,6 +155,11 @@ class CRM_Contact_Form_Search_Custom_GroupTest extends CiviUnitTestCase { /** * Test CRM_Contact_Form_Search_Custom_Group::contactIDs() * @dataProvider dataProvider + * @param $fv + * @param $count + * @param $ids + * @param $full + * @throws \Exception */ public function testContactIDs($fv, $count, $ids, $full) { // Truncate affected tables diff --git a/tests/phpunit/CRM/Core/BAO/ActionScheduleTest.php b/tests/phpunit/CRM/Core/BAO/ActionScheduleTest.php index a762f5b3c7..76f4a7bd5f 100644 --- a/tests/phpunit/CRM/Core/BAO/ActionScheduleTest.php +++ b/tests/phpunit/CRM/Core/BAO/ActionScheduleTest.php @@ -891,6 +891,10 @@ class CRM_Core_BAO_ActionScheduleTest extends CiviUnitTestCase { * created entities and provides for brainless clenaup. * * @see CRM_Core_DAO::createTestObject + * @param $daoName + * @param array $params + * @param int $numObjects + * @param bool $createOnly */ function createTestObject($daoName, $params = array(), $numObjects = 1, $createOnly = FALSE) { $objects = CRM_Core_DAO::createTestObject($daoName, $params, $numObjects, $createOnly); diff --git a/tests/phpunit/CRM/Core/DAOTest.php b/tests/phpunit/CRM/Core/DAOTest.php index 204eb317a0..fd4cce327c 100644 --- a/tests/phpunit/CRM/Core/DAOTest.php +++ b/tests/phpunit/CRM/Core/DAOTest.php @@ -133,6 +133,9 @@ class CRM_Core_DAOTest extends CiviUnitTestCase { /** * @dataProvider composeQueryExamples + * @param $inputSql + * @param $inputParams + * @param $expectSql */ public function testComposeQuery($inputSql, $inputParams, $expectSql) { $actualSql = CRM_Core_DAO::composeQuery($inputSql, $inputParams); @@ -195,6 +198,10 @@ class CRM_Core_DAOTest extends CiviUnitTestCase { /** * @dataProvider sqlNameDataProvider + * @param $inputData + * @param $length + * @param $makeRandom + * @param $expectedResult */ public function testShortenSQLName($inputData, $length, $makeRandom, $expectedResult) { $this->assertEquals($expectedResult, CRM_Core_DAO::shortenSQLName($inputData, $length, $makeRandom)); diff --git a/tests/phpunit/CRM/Core/Smarty/plugins/CrmScopeTest.php b/tests/phpunit/CRM/Core/Smarty/plugins/CrmScopeTest.php index 379ae8961c..7c6efc32b6 100644 --- a/tests/phpunit/CRM/Core/Smarty/plugins/CrmScopeTest.php +++ b/tests/phpunit/CRM/Core/Smarty/plugins/CrmScopeTest.php @@ -41,6 +41,8 @@ class CRM_Core_Smarty_plugins_CrmScopeTest extends CiviUnitTestCase { /** * @dataProvider scopeCases + * @param $expected + * @param $input */ public function testBlank($expected, $input) { $smarty = CRM_Core_Smarty::singleton(); diff --git a/tests/phpunit/CRM/Core/TransactionTest.php b/tests/phpunit/CRM/Core/TransactionTest.php index ee1a551180..980d0ae60d 100644 --- a/tests/phpunit/CRM/Core/TransactionTest.php +++ b/tests/phpunit/CRM/Core/TransactionTest.php @@ -58,6 +58,7 @@ class CRM_Core_TransactionTest extends CiviUnitTestCase { /** * @dataProvider dataCreateStyle + * @param $createStyle */ public function testBasicRollback($createStyle) { $this->createContactWithTransaction('reuse-tx', $createStyle, 'rollback'); diff --git a/tests/phpunit/CRM/Mailing/BAO/QueryTest.php b/tests/phpunit/CRM/Mailing/BAO/QueryTest.php index 488aff6aa5..0052ed6483 100644 --- a/tests/phpunit/CRM/Mailing/BAO/QueryTest.php +++ b/tests/phpunit/CRM/Mailing/BAO/QueryTest.php @@ -39,6 +39,10 @@ class CRM_Mailing_BAO_QueryTest extends CiviUnitTestCase { /** * Test CRM_Contact_BAO_Query::searchQuery() * @dataProvider dataProvider + * @param $fv + * @param $count + * @param $ids + * @param $full */ public function testSearch($fv, $count, $ids, $full) { $op = new PHPUnit_Extensions_Database_Operation_Insert(); diff --git a/tests/phpunit/CRM/Queue/Queue/SqlTest.php b/tests/phpunit/CRM/Queue/Queue/SqlTest.php index d85b8e8b0b..fe67bbbef8 100644 --- a/tests/phpunit/CRM/Queue/Queue/SqlTest.php +++ b/tests/phpunit/CRM/Queue/Queue/SqlTest.php @@ -70,6 +70,7 @@ class CRM_Queue_Queue_SqlTest extends CiviUnitTestCase { * Create a few queue items; alternately enqueue and dequeue various * * @dataProvider getQueueSpecs + * @param $queueSpec */ public function testPriorities($queueSpec) { $this->queue = $this->queueService->create($queueSpec); diff --git a/tests/phpunit/CRM/Queue/QueueTest.php b/tests/phpunit/CRM/Queue/QueueTest.php index ab8d4404de..24c4902131 100644 --- a/tests/phpunit/CRM/Queue/QueueTest.php +++ b/tests/phpunit/CRM/Queue/QueueTest.php @@ -74,6 +74,7 @@ class CRM_Queue_QueueTest extends CiviUnitTestCase { * Create a few queue items; alternately enqueue and dequeue various * * @dataProvider getQueueSpecs + * @param $queueSpec */ public function testBasicUsage($queueSpec) { $this->queue = $this->queueService->create($queueSpec); @@ -120,6 +121,7 @@ class CRM_Queue_QueueTest extends CiviUnitTestCase { * Claim an item from the queue and release it back for subsequent processing * * @dataProvider getQueueSpecs + * @param $queueSpec */ public function testManualRelease($queueSpec) { $this->queue = $this->queueService->create($queueSpec); @@ -146,6 +148,7 @@ class CRM_Queue_QueueTest extends CiviUnitTestCase { * Test that item leases expire at the expected time * * @dataProvider getQueueSpecs + * @param $queueSpec */ public function testTimeoutRelease($queueSpec) { $this->queue = $this->queueService->create($queueSpec); @@ -180,6 +183,7 @@ class CRM_Queue_QueueTest extends CiviUnitTestCase { * Test that item leases can be ignored * * @dataProvider getQueueSpecs + * @param $queueSpec */ public function testStealItem($queueSpec) { $this->queue = $this->queueService->create($queueSpec); @@ -214,6 +218,7 @@ class CRM_Queue_QueueTest extends CiviUnitTestCase { * Test that queue content is reset when reset=>TRUE * * @dataProvider getQueueSpecs + * @param $queueSpec */ public function testCreateResetTrue($queueSpec) { $this->queue = $this->queueService->create($queueSpec); @@ -236,6 +241,7 @@ class CRM_Queue_QueueTest extends CiviUnitTestCase { * Test that queue content is not reset when reset is omitted * * @dataProvider getQueueSpecs + * @param $queueSpec */ public function testCreateResetFalse($queueSpec) { $this->queue = $this->queueService->create($queueSpec); @@ -260,6 +266,7 @@ class CRM_Queue_QueueTest extends CiviUnitTestCase { * Test that queue content is not reset when using load() * * @dataProvider getQueueSpecs + * @param $queueSpec */ public function testLoad($queueSpec) { $this->queue = $this->queueService->create($queueSpec); diff --git a/tests/phpunit/CRM/Report/Form/Contribute/DetailTest.php b/tests/phpunit/CRM/Report/Form/Contribute/DetailTest.php index 6a194b8d5f..9ba0b85370 100644 --- a/tests/phpunit/CRM/Report/Form/Contribute/DetailTest.php +++ b/tests/phpunit/CRM/Report/Form/Contribute/DetailTest.php @@ -82,6 +82,11 @@ class CRM_Report_Form_Contribute_DetailTest extends CiviReportTestCase { /** * @dataProvider dataProvider + * @param $reportClass + * @param $inputParams + * @param $dataSet + * @param $expectedOutputCsvFile + * @throws \Exception */ public function testReportOutput($reportClass, $inputParams, $dataSet, $expectedOutputCsvFile) { $config = CRM_Core_Config::singleton(); diff --git a/tests/phpunit/CRM/Report/Form/TestCaseTest.php b/tests/phpunit/CRM/Report/Form/TestCaseTest.php index a6629ab37a..4c0438720a 100644 --- a/tests/phpunit/CRM/Report/Form/TestCaseTest.php +++ b/tests/phpunit/CRM/Report/Form/TestCaseTest.php @@ -144,6 +144,11 @@ class CRM_Report_Form_TestCaseTest extends CiviReportTestCase { /** * @dataProvider dataProvider + * @param $reportClass + * @param $inputParams + * @param $dataSet + * @param $expectedOutputCsvFile + * @throws \Exception */ public function testReportOutput($reportClass, $inputParams, $dataSet, $expectedOutputCsvFile) { $config = CRM_Core_Config::singleton(); @@ -159,6 +164,11 @@ class CRM_Report_Form_TestCaseTest extends CiviReportTestCase { /** * @expectedException PHPUnit_Framework_AssertionFailedError * @dataProvider badDataProvider + * @param $reportClass + * @param $inputParams + * @param $dataSet + * @param $expectedOutputCsvFile + * @throws \Exception */ public function testBadReportOutput($reportClass, $inputParams, $dataSet, $expectedOutputCsvFile) { $config = CRM_Core_Config::singleton(); diff --git a/tests/phpunit/CRM/Utils/RuleTest.php b/tests/phpunit/CRM/Utils/RuleTest.php index dbd31b7fbc..d3be0ee46c 100644 --- a/tests/phpunit/CRM/Utils/RuleTest.php +++ b/tests/phpunit/CRM/Utils/RuleTest.php @@ -13,6 +13,8 @@ class CRM_Utils_RuleTest extends CiviUnitTestCase { /** * @dataProvider integerDataProvider + * @param $inputData + * @param $expectedResult */ public function testInteger($inputData, $expectedResult) { $this->assertEquals($expectedResult, CRM_Utils_Rule::integer($inputData)); @@ -34,6 +36,8 @@ class CRM_Utils_RuleTest extends CiviUnitTestCase { /** * @dataProvider positiveDataProvider + * @param $inputData + * @param $expectedResult */ public function testPositive($inputData, $expectedResult) { $this->assertEquals($expectedResult, CRM_Utils_Rule::positiveInteger($inputData)); @@ -55,6 +59,8 @@ class CRM_Utils_RuleTest extends CiviUnitTestCase { /** * @dataProvider numericDataProvider + * @param $inputData + * @param $expectedResult */ public function testNumeric($inputData, $expectedResult) { $this->assertEquals($expectedResult, CRM_Utils_Rule::numeric($inputData)); diff --git a/tests/phpunit/CRM/Utils/StringTest.php b/tests/phpunit/CRM/Utils/StringTest.php index 41acb07624..e92a8ad94f 100644 --- a/tests/phpunit/CRM/Utils/StringTest.php +++ b/tests/phpunit/CRM/Utils/StringTest.php @@ -114,6 +114,9 @@ class CRM_Utils_StringTest extends CiviUnitTestCase { /** * @dataProvider parsePrefixData + * @param $input + * @param $defaultPrefix + * @param $expected */ public function testParsePrefix($input, $defaultPrefix, $expected) { $actual = CRM_Utils_String::parsePrefix(':', $input, $defaultPrefix); diff --git a/tests/phpunit/CRM/Utils/TypeTest.php b/tests/phpunit/CRM/Utils/TypeTest.php index 301136e2b5..923bbe27c4 100644 --- a/tests/phpunit/CRM/Utils/TypeTest.php +++ b/tests/phpunit/CRM/Utils/TypeTest.php @@ -13,6 +13,9 @@ class CRM_Utils_TypeTest extends CiviUnitTestCase { /** * @dataProvider validateDataProvider + * @param $inputData + * @param $inputType + * @param $expectedResult */ public function testValidate($inputData, $inputType, $expectedResult) { $this->assertEquals($expectedResult, CRM_Utils_Type::validate($inputData, $inputType, FALSE)); diff --git a/tests/phpunit/Civi/API/KernelTest.php b/tests/phpunit/Civi/API/KernelTest.php index 0d429b2740..ab1cebd035 100644 --- a/tests/phpunit/Civi/API/KernelTest.php +++ b/tests/phpunit/Civi/API/KernelTest.php @@ -95,7 +95,6 @@ class KernelTest extends \CiviUnitTestCase { * @param array $monitoredEvents * List of event names. * - * @internal param \Symfony\Component\EventDispatcher\EventDispatcher $this ->dispatcher */ public function monitorEvents($monitoredEvents) { foreach ($monitoredEvents as $monitoredEvent) { diff --git a/tests/phpunit/Civi/API/RequestTest.php b/tests/phpunit/Civi/API/RequestTest.php index f9b7ac1c72..f2e068f618 100644 --- a/tests/phpunit/Civi/API/RequestTest.php +++ b/tests/phpunit/Civi/API/RequestTest.php @@ -135,6 +135,9 @@ class RequestTest extends \CiviUnitTestCase { /** * @dataProvider validEntityActionPairs + * @param $input + * @param $expected + * @throws \API_Exception */ public function testCreateRequest_EntityActionMunging($input, $expected) { list ($inEntity, $inAction, $inVersion) = $input; @@ -159,6 +162,10 @@ class RequestTest extends \CiviUnitTestCase { /** * @dataProvider invalidEntityActionPairs * @expectedException \API_Exception + * @param $inEntity + * @param $inAction + * @param $inVersion + * @throws \API_Exception */ public function testCreateRequest_InvalidEntityAction($inEntity, $inAction, $inVersion) { Request::create($inEntity, $inAction, array('version' => $inVersion), NULL); diff --git a/tests/phpunit/Civi/API/Subscriber/TransactionSubscriberTest.php b/tests/phpunit/Civi/API/Subscriber/TransactionSubscriberTest.php index 58d76d6bc4..684f30463e 100644 --- a/tests/phpunit/Civi/API/Subscriber/TransactionSubscriberTest.php +++ b/tests/phpunit/Civi/API/Subscriber/TransactionSubscriberTest.php @@ -80,6 +80,14 @@ class TransactionSubscriberTest extends \CiviUnitTestCase { /** * Ensure that API parameters "is_transactional" and "force_rollback" are parsed correctly * @dataProvider transactionOptions + * @param $version + * @param $entity + * @param $action + * @param $params + * @param $isTransactional + * @param $isForceRollback + * @param $isNested + * @throws \API_Exception */ public function testTransactionOptions($version, $entity, $action, $params, $isTransactional, $isForceRollback, $isNested) { $txs = new TransactionSubscriber(); diff --git a/tests/phpunit/CiviTest/CiviDBAssert.php b/tests/phpunit/CiviTest/CiviDBAssert.php index ba415c81e0..ff12960746 100644 --- a/tests/phpunit/CiviTest/CiviDBAssert.php +++ b/tests/phpunit/CiviTest/CiviDBAssert.php @@ -43,6 +43,11 @@ class CiviDBAssert { * @match array Associative array of field name => expected value. Empty if asserting * that a DELETE occurred * @delete boolean True if we're checking that a DELETE action occurred. + * @param $testCase + * @param $daoName + * @param $id + * @param $match + * @param bool $delete */ public function assertDBState(&$testCase, $daoName, $id, $match, $delete = FALSE) { if (empty($id)) { @@ -90,6 +95,13 @@ class CiviDBAssert { /** * Request a record from the DB by seachColumn+searchValue. Success if a record is found. + * @param $testCase + * @param $daoName + * @param $searchValue + * @param $returnColumn + * @param $searchColumn + * @param $message + * @return null|string */ public function assertDBNotNull(&$testCase, $daoName, $searchValue, $returnColumn, $searchColumn, $message) { if (empty($searchValue)) { @@ -103,6 +115,12 @@ class CiviDBAssert { /** * Request a record from the DB by seachColumn+searchValue. Success if returnColumn value is NULL. + * @param $testCase + * @param $daoName + * @param $searchValue + * @param $returnColumn + * @param $searchColumn + * @param $message */ public function assertDBNull(&$testCase, $daoName, $searchValue, $returnColumn, $searchColumn, $message) { $value = CRM_Core_DAO::getFieldValue($daoName, $searchValue, $returnColumn, $searchColumn); @@ -111,6 +129,10 @@ class CiviDBAssert { /** * Request a record from the DB by id. Success if row not found. + * @param $testCase + * @param $daoName + * @param $id + * @param $message */ public function assertDBRowNotExist(&$testCase, $daoName, $id, $message) { $value = CRM_Core_DAO::getFieldValue($daoName, $id, 'id', 'id'); @@ -138,6 +160,10 @@ class CiviDBAssert { /** * Compare all values in a single retrieved DB record to an array of expected values + * @param $testCase + * @param $daoName + * @param $searchParams + * @param $expectedValues */ public function assertDBCompareValues(&$testCase, $daoName, $searchParams, $expectedValues) { //get the values from db diff --git a/tests/phpunit/CiviTest/CiviMailUtils.php b/tests/phpunit/CiviTest/CiviMailUtils.php index 73b147297f..8eda18b962 100644 --- a/tests/phpunit/CiviTest/CiviMailUtils.php +++ b/tests/phpunit/CiviTest/CiviMailUtils.php @@ -271,6 +271,7 @@ class CiviMailUtils extends PHPUnit_Framework_TestCase { /** * Check that mail log is empty + * @param string $prefix */ public function assertMailLogEmpty($prefix = '') { $mail = $this->getMostRecentEmail('raw'); diff --git a/tests/phpunit/CiviTest/CiviSeleniumTestCase.php b/tests/phpunit/CiviTest/CiviSeleniumTestCase.php index 8f80e4aa04..9b708b70dd 100644 --- a/tests/phpunit/CiviTest/CiviSeleniumTestCase.php +++ b/tests/phpunit/CiviTest/CiviSeleniumTestCase.php @@ -229,6 +229,9 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { * Click on a link or button * Wait for the page to load * Wait for an element to be present + * @param $element + * @param string $waitFor + * @param bool $waitForPageLoad */ public function clickLink($element, $waitFor = 'civicrm-footer', $waitForPageLoad = TRUE) { $this->click($element); @@ -298,6 +301,10 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { /** * Call the API on the local server * (kind of defeats the point of a webtest - see CRM-11889) + * @param $entity + * @param $action + * @param $params + * @return array|int */ public function webtest_civicrm_api($entity, $action, $params) { if (!isset($params['version'])) { @@ -313,6 +320,10 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { * Call the API on the remote server * Experimental - currently only works if permissions on remote site allow anon user to access ajax api * @see CRM-11889 + * @param $entity + * @param $action + * @param array $params + * @return mixed */ public function rest_civicrm_api($entity, $action, $params = array()) { $params += array( @@ -392,6 +403,7 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { /** * Ensures the required CiviCRM components are enabled + * @param $components */ public function enableComponents($components) { $this->openCiviPage("admin/setting/component", "reset=1", "_qf_Component_next-bottom"); @@ -493,6 +505,8 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { } /** + * @param $sortName + * @param string $fieldName */ public function webtestFillAutocomplete($sortName, $fieldName = 'contact_id') { $this->select2($fieldName, $sortName); @@ -500,6 +514,7 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { } /** + * @param $sortName */ public function webtestOrganisationAutocomplete($sortName) { $this->clickAt("//*[@id='contact_id']/../div/a"); @@ -596,7 +611,8 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { * @param string $editor * Which text editor (valid values are 'CKEditor', 'TinyMCE'). * - * @return void + * @param bool $compressed + * @throws \PHPUnit_Framework_AssertionFailedError */ public function fillRichTextField($fieldName, $text = 'Typing this text into editor.', $editor = 'CKEditor', $compressed = FALSE) { // make sure cursor focuses on the field @@ -684,6 +700,13 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { /** * @deprecated in favor of createDialogContact + * @param string $fname + * @param string $lname + * @param string $email + * @param int $type + * @param string $selectId + * @param int $row + * @param string $prefix */ function webtestNewDialogContact( $fname = 'Anthony', $lname = 'Anderson', $email = 'anthony@anderson.biz', @@ -762,6 +785,9 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { /** * Returns a single argument from the url query + * @param $arg + * @param null $url + * @return null */ public function urlArg($arg, $url = NULL) { $elements = $this->parseURL($url); @@ -1037,7 +1063,6 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { * @param string $financialType * @param bool $fixedAmount * @param bool $membershipsRequired - * @internal param \can $User define pageTitle, hash and rand values for later data verification * * @return null * of newly created online contribution page. @@ -1786,6 +1811,17 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { /** * Edit Financial Account + * @param $editfinancialAccount + * @param bool $financialAccountTitle + * @param bool $financialAccountDescription + * @param bool $accountingCode + * @param bool $firstName + * @param bool $financialAccountType + * @param bool $taxDeductible + * @param bool $isActive + * @param bool $isTax + * @param bool $taxRate + * @param bool $isDefault */ function _testEditFinancialAccount( $editfinancialAccount, @@ -1874,6 +1910,7 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { /** * Delete Financial Account + * @param $financialAccountTitle */ public function _testDeleteFinancialAccount($financialAccountTitle) { $this->click("xpath=//table/tbody//tr/td[1]/div[text()='{$financialAccountTitle}']/../../td[9]/span/a[text()='Delete']"); @@ -1885,6 +1922,7 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { /** * Verify data after ADD and EDIT + * @param $verifyData */ public function _assertFinancialAccount($verifyData) { foreach ($verifyData as $key => $expectedValue) { @@ -1964,6 +2002,7 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { /** * Give the specified permissions * Note: this function logs in as 'admin' (logging out if necessary) + * @param $permission */ public function changePermissions($permission) { $this->webtestLogin('admin'); @@ -2203,6 +2242,10 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { /** * Type and select first occurance of autocomplete + * @param $fieldName + * @param $label + * @param bool $multiple + * @param bool $xpath */ public function select2($fieldName, $label, $multiple = FALSE, $xpath = FALSE) { // In the case of chainSelect, wait for options to load @@ -2235,6 +2278,8 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { /** * Select multiple options + * @param $fieldid + * @param $params */ public function multiselect2($fieldid, $params) { // In the case of chainSelect, wait for options to load @@ -2251,6 +2296,7 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { /** * Check for unobtrusive status message as set by CRM.status + * @param null $text */ public function checkCRMStatus($text = NULL) { $this->waitForElementPresent("css=.crm-status-box-outer.status-success"); @@ -2261,6 +2307,8 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { /** * Check for obtrusive status message as set by CRM.alert + * @param $text + * @param string $type */ public function checkCRMAlert($text, $type = 'success') { $this->waitForElementPresent("css=div.ui-notify-message.$type"); diff --git a/tests/phpunit/CiviTest/CiviTestSuite.php b/tests/phpunit/CiviTest/CiviTestSuite.php index de3e081ad2..5c073aa057 100644 --- a/tests/phpunit/CiviTest/CiviTestSuite.php +++ b/tests/phpunit/CiviTest/CiviTestSuite.php @@ -40,6 +40,8 @@ class CiviTestSuite extends PHPUnit_Framework_TestSuite { /** * Simple name based constructor + * @param string $theClass + * @param string $name */ public function __construct($theClass = '', $name = '') { if (empty($name)) { @@ -80,6 +82,8 @@ class CiviTestSuite extends PHPUnit_Framework_TestSuite { } /** + * @param $myfile + * @return \PHPUnit_Framework_TestSuite */ protected function implSuite($myfile) { $name = str_replace('_', diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index 696f38329a..04299f181f 100755 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -562,6 +562,11 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { * @match array Associative array of field name => expected value. Empty if asserting * that a DELETE occurred * @delete boolean True if we're checking that a DELETE action occurred. + * @param $daoName + * @param $id + * @param $match + * @param bool $delete + * @throws \PHPUnit_Framework_AssertionFailedError */ public function assertDBState($daoName, $id, $match, $delete = FALSE) { if (empty($id)) { @@ -705,6 +710,10 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { * * Example: $this->assertSql(2, 'select count(*) from foo where foo.bar like "%1"', * array(1 => array("Whiz", "String"))); + * @param $expected + * @param $query + * @param array $params + * @param string $message */ public function assertDBQuery($expected, $query, $params = array(), $message = '') { if ($message) { @@ -850,6 +859,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { /** * Check that a deleted item has been deleted + * @param $entity + * @param $id */ public function assertAPIDeleted($entity, $id) { $this->callAPISuccess($entity, 'getcount', array('id' => $id), 0); @@ -2060,6 +2071,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { /** * Existing function doesn't allow params to be over-ridden so need a new one * this one allows you to only pass in the params you want to change + * @param array $params + * @return array|int */ public function CustomGroupCreateByParams($params = array()) { $defaults = array( @@ -2075,6 +2088,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { /** * Create custom group with multi fields + * @param array $params + * @return array|int */ public function CustomGroupMultipleCreateByParams($params = array()) { $defaults = array( @@ -2087,6 +2102,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { /** * Create custom group with multi fields + * @param array $params + * @return array */ public function CustomGroupMultipleCreateWithFields($params = array()) { // also need to pass on $params['custom_field'] if not set but not in place yet @@ -2752,6 +2769,7 @@ AND ( TABLE_NAME LIKE 'civicrm_value_%' ) /** * Temporarily replace the singleton extension with a different one + * @param \CRM_Extension_System $system */ public function setExtensionSystem(CRM_Extension_System $system) { if ($this->origExtensionSystem == NULL) { @@ -3080,6 +3098,8 @@ AND ( TABLE_NAME LIKE 'civicrm_value_%' ) * this parent class & we don't have a structure for that yet * There is another function to this effect on the PaypalPro test but it appears to be silently failing * & the best protection agains that is the functions this class affords + * @param array $params + * @return */ public function paymentProcessorCreate($params = array()) { $params = array_merge(array( diff --git a/tests/phpunit/CiviTest/Membership.php b/tests/phpunit/CiviTest/Membership.php index 91e8d50041..f6ec88e8c6 100644 --- a/tests/phpunit/CiviTest/Membership.php +++ b/tests/phpunit/CiviTest/Membership.php @@ -40,6 +40,9 @@ class Membership extends PHPUnit_Framework_Testcase { /** * Helper function to create membership block for contribution page + * @param $membershipType + * @param $contributionPageId + * @return $this */ public function createMembershipBlock($membershipType, $contributionPageId) { $param = array( @@ -67,6 +70,7 @@ class Membership extends PHPUnit_Framework_Testcase { /** * Helper function to delete the membership block + * @param $blcokId */ public function deleteMembershipBlock($blcokId) { $dao = new CRM_Member_DAO_MembershipBlock(); diff --git a/tests/phpunit/Utils.php b/tests/phpunit/Utils.php index 51ac65e77d..cfc7d1dae4 100644 --- a/tests/phpunit/Utils.php +++ b/tests/phpunit/Utils.php @@ -44,6 +44,10 @@ class Utils { /** * Construct an object for this database + * @param $host + * @param $port + * @param $user + * @param $pass */ public function __construct($host, $port, $user, $pass) { try { diff --git a/tests/phpunit/WebTest/Contact/MergeContactsTest.php b/tests/phpunit/WebTest/Contact/MergeContactsTest.php index de6285e06f..05d14983db 100644 --- a/tests/phpunit/WebTest/Contact/MergeContactsTest.php +++ b/tests/phpunit/WebTest/Contact/MergeContactsTest.php @@ -639,6 +639,11 @@ class WebTest_Contact_MergeContactsTest extends CiviSeleniumTestCase { /** * Helper FN + * @param null $firstName + * @param null $lastName + * @param null $organizationName + * @param string $contactType + * @return array */ public function _createContacts($firstName = NULL, $lastName = NULL, $organizationName = NULL, $contactType = 'Individual') { if ($contactType == 'Individual') { @@ -730,6 +735,7 @@ class WebTest_Contact_MergeContactsTest extends CiviSeleniumTestCase { /** * Helper FN * to create new membership type + * @param $membershipOrganization */ public function addMembershipType($membershipOrganization) { $this->openCiviPage("admin/member/membershipType", "reset=1&action=browse"); diff --git a/tests/phpunit/WebTest/Contact/MultipleContactSubTypes.php b/tests/phpunit/WebTest/Contact/MultipleContactSubTypes.php index 0bcbaba77f..f6e2af0cba 100644 --- a/tests/phpunit/WebTest/Contact/MultipleContactSubTypes.php +++ b/tests/phpunit/WebTest/Contact/MultipleContactSubTypes.php @@ -215,6 +215,8 @@ class WebTest_Contact_MultipleContactSubTypes extends CiviSeleniumTestCase { /** * Add custom fields for a contact sub-type + * @param $contactSubType + * @return array */ public function _addCustomData($contactSubType) { $this->openCiviPage("admin/custom/group", "action=add&reset=1"); diff --git a/tests/phpunit/WebTest/Contact/SearchBuilderTest.php b/tests/phpunit/WebTest/Contact/SearchBuilderTest.php index d0215ef326..71fe3cb47b 100644 --- a/tests/phpunit/WebTest/Contact/SearchBuilderTest.php +++ b/tests/phpunit/WebTest/Contact/SearchBuilderTest.php @@ -238,6 +238,13 @@ class WebTest_Contact_SearchBuilderTest extends CiviSeleniumTestCase { /** * Enter form values in a Search Builder row + * @param $set + * @param $row + * @param $entity + * @param $field + * @param $loc + * @param $op + * @param string $value */ public function enterValues($set, $row, $entity, $field, $loc, $op, $value = '') { if ($set > 1 && $row == 1) { diff --git a/tests/phpunit/WebTest/Contact/SearchTest.php b/tests/phpunit/WebTest/Contact/SearchTest.php index 083ad8bdb4..9258337410 100644 --- a/tests/phpunit/WebTest/Contact/SearchTest.php +++ b/tests/phpunit/WebTest/Contact/SearchTest.php @@ -155,6 +155,8 @@ class WebTest_Contact_SearchTest extends CiviSeleniumTestCase { * This code is reused with advanced search, hence the reference to $self * * @static + * @param string $tagName + * @param $self */ public static function addTag($tagName = 'New Tag', $self) { $self->openCiviPage('admin/tag', array('reset' => 1, 'action' => 'add'), '_qf_Tag_next'); diff --git a/tests/phpunit/WebTest/Contact/SignatureTest.php b/tests/phpunit/WebTest/Contact/SignatureTest.php index 5967bc590a..f9ce67df72 100644 --- a/tests/phpunit/WebTest/Contact/SignatureTest.php +++ b/tests/phpunit/WebTest/Contact/SignatureTest.php @@ -143,6 +143,7 @@ class WebTest_Contact_SignatureTest extends CiviSeleniumTestCase { /** * Helper function to select Editor. + * @param $editor */ public function _selectEditor($editor) { $this->openCiviPage('admin/setting/preferences/display', 'reset=1'); @@ -158,6 +159,9 @@ class WebTest_Contact_SignatureTest extends CiviSeleniumTestCase { /** * Helper function for Check Signature in Editor. + * @param $fieldName + * @param $signature + * @param $editor */ public function _checkSignature($fieldName, $signature, $editor) { if ($editor == 'CKEditor') { @@ -174,6 +178,8 @@ class WebTest_Contact_SignatureTest extends CiviSeleniumTestCase { /** * Helper function for Check Signature in Activity. + * @param $subject + * @param $signature */ public function _checkActivity($subject, $signature) { $this->openCiviPage('activity/search', 'reset=1', '_qf_Search_refresh'); diff --git a/tests/phpunit/WebTest/Profile/MultiRecordProfileAddTest.php b/tests/phpunit/WebTest/Profile/MultiRecordProfileAddTest.php index be7fe7b609..9865fed2cb 100644 --- a/tests/phpunit/WebTest/Profile/MultiRecordProfileAddTest.php +++ b/tests/phpunit/WebTest/Profile/MultiRecordProfileAddTest.php @@ -372,9 +372,9 @@ class WebTest_Profile_MultiRecordProfileAddTest extends CiviSeleniumTestCase { /** * @param string $context - * @param string $parentElement - * + * @param bool $dialog * @return mixed + * */ public function _addRecords($context = 'Edit', $dialog = FALSE) { $params['text'] = 'text' . substr(sha1(rand()), 0, 3); diff --git a/tests/phpunit/WebTest/Utils/RestTest.php b/tests/phpunit/WebTest/Utils/RestTest.php index 7de715130a..4000c7ee8a 100644 --- a/tests/phpunit/WebTest/Utils/RestTest.php +++ b/tests/phpunit/WebTest/Utils/RestTest.php @@ -189,6 +189,8 @@ class WebTest_Utils_RestTest extends CiviSeleniumTestCase { /** * @dataProvider apiTestCases + * @param $query + * @param $is_error */ public function testAPICalls($query, $is_error) { $client = CRM_Utils_HttpClient::singleton(); diff --git a/tests/phpunit/api/v3/ACLPermissionTest.php b/tests/phpunit/api/v3/ACLPermissionTest.php index 1cf86362b4..431adcfc3b 100644 --- a/tests/phpunit/api/v3/ACLPermissionTest.php +++ b/tests/phpunit/api/v3/ACLPermissionTest.php @@ -247,6 +247,7 @@ class api_v3_ACLPermissionTest extends CiviUnitTestCase { /** * @dataProvider entities * confirm that without check permissions we still get 2 contacts returned + * @param $entity */ public function testEntitiesGetHookLimitingHookNoCheck($entity) { CRM_Core_Config::singleton()->userPermissionClass->permissions = array(); @@ -262,6 +263,7 @@ class api_v3_ACLPermissionTest extends CiviUnitTestCase { /** * @dataProvider entities * confirm that without check permissions we still get 2 entities returned + * @param $entity */ public function testEntitiesGetCoreACLLimitingHookNoCheck($entity) { $this->setupCoreACL(); @@ -278,6 +280,8 @@ class api_v3_ACLPermissionTest extends CiviUnitTestCase { /** * @dataProvider entities * confirm that with check permissions we don't get entities + * @param $entity + * @throws \PHPUnit_Framework_IncompleteTestError */ public function testEntitiesGetCoreACLLimitingCheck($entity) { $this->markTestIncomplete('this does not work in 4.4 but can be enabled in 4.5 or a security release of 4.4 including the important security fix CRM-14877'); @@ -294,6 +298,8 @@ class api_v3_ACLPermissionTest extends CiviUnitTestCase { /** * @dataProvider entities * Function tests that an empty where hook returns no results + * @param $entity + * @throws \PHPUnit_Framework_IncompleteTestError */ public function testEntityGetNoResultsHook($entity) { $this->markTestIncomplete('hook acls only work with contacts so far'); @@ -315,6 +321,7 @@ class api_v3_ACLPermissionTest extends CiviUnitTestCase { /** * Create 2 entities + * @param $entity */ public function setUpEntities($entity) { $baoObj = new CRM_Core_DAO(); @@ -329,6 +336,11 @@ class api_v3_ACLPermissionTest extends CiviUnitTestCase { /** * No results returned + * @param $type + * @param $tables + * @param $whereTables + * @param $contactID + * @param $where */ public function aclWhereHookNoResults($type, &$tables, &$whereTables, &$contactID, &$where) { } @@ -336,6 +348,11 @@ class api_v3_ACLPermissionTest extends CiviUnitTestCase { /** * All results returned * @implements CRM_Utils_Hook::aclWhereClause + * @param $type + * @param $tables + * @param $whereTables + * @param $contactID + * @param $where */ public function aclWhereHookAllResults($type, &$tables, &$whereTables, &$contactID, &$where) { $where = " (1) "; @@ -344,6 +361,11 @@ class api_v3_ACLPermissionTest extends CiviUnitTestCase { /** * Full results returned * @implements CRM_Utils_Hook::aclWhereClause + * @param $type + * @param $tables + * @param $whereTables + * @param $contactID + * @param $where */ public function aclWhereOnlySecond($type, &$tables, &$whereTables, &$contactID, &$where) { $where = " contact_a.id > 1"; diff --git a/tests/phpunit/api/v3/AllTests.php b/tests/phpunit/api/v3/AllTests.php index 467ef7ffc4..ba828c6cc9 100644 --- a/tests/phpunit/api/v3/AllTests.php +++ b/tests/phpunit/api/v3/AllTests.php @@ -45,6 +45,8 @@ class api_v3_AllTests extends CiviTestSuite { /** * Simple name based constructor + * @param string $theClass + * @param string $name */ function __construct($theClass = '', $name = '') { parent::__construct($theClass, $name); diff --git a/tests/phpunit/api/v3/ContributionTest.php b/tests/phpunit/api/v3/ContributionTest.php index 3edd7f0272..5fecd0634b 100644 --- a/tests/phpunit/api/v3/ContributionTest.php +++ b/tests/phpunit/api/v3/ContributionTest.php @@ -1565,6 +1565,9 @@ class api_v3_ContributionTest extends CiviUnitTestCase { /** * This function does a GET & compares the result against the $params * Use as a double check on Creates + * @param $params + * @param $id + * @param int $delete */ public function contributionGetnCheck($params, $id, $delete = 1) { diff --git a/tests/phpunit/api/v3/RelationshipTypeTest.php b/tests/phpunit/api/v3/RelationshipTypeTest.php index 9d8a551648..9354fab545 100644 --- a/tests/phpunit/api/v3/RelationshipTypeTest.php +++ b/tests/phpunit/api/v3/RelationshipTypeTest.php @@ -322,6 +322,8 @@ class api_v3_RelationshipTypeTest extends CiviUnitTestCase { /** * Create relationship type. + * @param null $params + * @return mixed */ public function _relationshipTypeCreate($params = NULL) { if (!is_array($params) || empty($params)) { diff --git a/tests/phpunit/api/v3/ReportTemplateTest.php b/tests/phpunit/api/v3/ReportTemplateTest.php index 2ce2645a2a..3e89285651 100644 --- a/tests/phpunit/api/v3/ReportTemplateTest.php +++ b/tests/phpunit/api/v3/ReportTemplateTest.php @@ -136,6 +136,8 @@ class api_v3_ReportTemplateTest extends CiviUnitTestCase { /** * @dataProvider getReportTemplates + * @param $reportID + * @throws \PHPUnit_Framework_IncompleteTestError */ public function testReportTemplateGetRowsAllReports($reportID) { if (stristr($reportID, 'has existing issues')) { @@ -148,6 +150,8 @@ class api_v3_ReportTemplateTest extends CiviUnitTestCase { /** * @dataProvider getReportTemplates + * @param $reportID + * @throws \PHPUnit_Framework_IncompleteTestError */ public function testReportTemplateGetStatisticsAllReports($reportID) { if (stristr($reportID, 'has existing issues')) { diff --git a/tests/phpunit/api/v3/SyntaxConformanceTest.php b/tests/phpunit/api/v3/SyntaxConformanceTest.php index c2f96504ec..30213f51bf 100644 --- a/tests/phpunit/api/v3/SyntaxConformanceTest.php +++ b/tests/phpunit/api/v3/SyntaxConformanceTest.php @@ -361,6 +361,8 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { /** * At this stage exclude the ones that don't pass & add them as we can troubleshoot them + * @param bool $sequential + * @return array */ public static function toBeSkipped_updatesingle($sequential = FALSE) { $entitiesWithout = array( @@ -581,6 +583,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { /** * @dataProvider toBeSkipped_get entities that don't need a get action + * @param $Entity */ public function testNotImplemented_get($Entity) { $result = civicrm_api($Entity, 'Get', array('version' => 3)); @@ -592,6 +595,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { /** * @dataProvider entities * @expectedException PHPUnit_Framework_Error + * @param $Entity */ public function testWithoutParam_get($Entity) { // should get php complaining that a param is missing @@ -600,6 +604,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { /** * @dataProvider entities + * @param $Entity */ public function testGetFields($Entity) { if (in_array($Entity, $this->deprecatedAPI) || $Entity == 'Entity' || $Entity == 'CustomValue') { @@ -615,6 +620,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { /** * @dataProvider entities_get + * @param $Entity */ public function testEmptyParam_get($Entity) { @@ -629,6 +635,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { /** * @dataProvider entities_get + * @param $Entity */ public function testEmptyParam_getString($Entity) { @@ -644,6 +651,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { /** * @dataProvider entities_get * @Xdepends testEmptyParam_get // no need to test the simple if the empty doesn't work/is skipped. doesn't seem to work + * @param $Entity */ public function testSimple_get($Entity) { // $this->markTestSkipped("test gives core error on test server (but not on our locals). Skip until we can get server to pass"); @@ -666,6 +674,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { /** * @dataProvider custom_data_entities_get + * @param $entityName */ public function testCustomDataGet($entityName) { $this->createLoggedInUser();// so subsidiary activities are created @@ -686,6 +695,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { /** * @dataProvider entities_get + * @param $Entity */ public function testAcceptsOnlyID_get($Entity) { // big random number. fun fact: if you multiply it by pi^e, the result is another random number, but bigger ;) @@ -720,6 +730,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { * limitations include the problem with avoiding loops when creating test objects - * hence FKs only set by createTestObject when required. e.g parent_id on campaign is not being followed through * Currency - only seems to support US + * @param $entityName */ public function testByID_get($entityName) { if (in_array($entityName, self::toBeSkipped_automock(TRUE))) { @@ -879,6 +890,8 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { * limitations include the problem with avoiding loops when creating test objects - * hence FKs only set by createTestObject when required. e.g parent_id on campaign is not being followed through * Currency - only seems to support US + * @param $entityName + * @throws \PHPUnit_Framework_IncompleteTestError */ public function testByIDAlias_get($entityName) { if (in_array($entityName, self::toBeSkipped_automock(TRUE))) { @@ -925,6 +938,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { /** * @dataProvider entities_get + * @param $Entity */ public function testNonExistantID_get($Entity) { // cf testAcceptsOnlyID_get @@ -952,6 +966,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { /** * @dataProvider toBeSkipped_create entities that don't need a create action + * @param $Entity */ public function testNotImplemented_create($Entity) { $result = civicrm_api($Entity, 'Create', array('version' => 3)); @@ -962,6 +977,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { /** * @dataProvider entities * @expectedException PHPUnit_Framework_Error + * @param $Entity */ public function testWithoutParam_create($Entity) { // should create php complaining that a param is missing @@ -970,6 +986,8 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { /** * @dataProvider entities_create + * @param $Entity + * @throws \PHPUnit_Framework_IncompleteTestError */ public function testEmptyParam_create($Entity) { $this->markTestIncomplete("fixing this test to test the api functions fails on numberous tests @@ -988,6 +1006,8 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { * @dataProvider entities_create * * Check that create doesn't work with an invalid + * @param $Entity + * @throws \PHPUnit_Framework_IncompleteTestError */ public function testInvalidID_create($Entity) { // turn test off for noew @@ -1015,6 +1035,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { * limitations include the problem with avoiding loops when creating test objects - * hence FKs only set by createTestObject when required. e.g parent_id on campaign is not being followed through * Currency - only seems to support US + * @param $entityName */ public function testCreateSingleValueAlter($entityName) { if (in_array($entityName, $this->toBeImplemented['create'])) { @@ -1197,6 +1218,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { /** * @dataProvider toBeSkipped_delete entities that don't need a delete action + * @param $Entity */ public function testNotImplemented_delete($Entity) { $nonExistantID = 151416349; @@ -1208,6 +1230,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { /** * @dataProvider entities * @expectedException PHPUnit_Framework_Error + * @param $Entity */ public function testWithoutParam_delete($Entity) { // should delete php complaining that a param is missing @@ -1216,6 +1239,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { /** * @dataProvider entities_delete + * @param $Entity */ public function testEmptyParam_delete($Entity) { if (in_array($Entity, $this->toBeImplemented['delete'])) { @@ -1229,6 +1253,8 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { /** * @dataProvider entities_delete + * @param $Entity + * @throws \PHPUnit_Framework_IncompleteTestError */ public function testInvalidID_delete($Entity) { // turn test off for now @@ -1258,6 +1284,8 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { * limitations include the problem with avoiding loops when creating test objects - * hence FKs only set by createTestObject when required. e.g parent_id on campaign is not being followed through * Currency - only seems to support US + * @param $entityName + * @throws \PHPUnit_Framework_IncompleteTestError */ public function testByID_delete($entityName) { // turn test off for noew @@ -1298,6 +1326,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { * Create two entities and make sure delete action only deletes one! * * @dataProvider entities_getfields + * @param $entity */ public function testGetfieldsHasTitle($entity) { $entities = $this->getEntitiesSupportingCustomFields();