From: Tim Otten Date: Tue, 6 Jan 2015 19:41:39 +0000 (-0800) Subject: INFRA-132 - tests/ - Convert single-line @param to multi-line X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e16033b4c1c4311d3a9edb8812087634f2b2667e;p=civicrm-core.git INFRA-132 - tests/ - Convert single-line @param to multi-line --- diff --git a/tests/extensions/test.extension.manager.paymenttest/main.php b/tests/extensions/test.extension.manager.paymenttest/main.php index 29d2a682b5..7e65c808a1 100644 --- a/tests/extensions/test.extension.manager.paymenttest/main.php +++ b/tests/extensions/test.extension.manager.paymenttest/main.php @@ -9,10 +9,14 @@ class test_extension_manager_paymenttest extends CRM_Core_Payment { /** * Singleton function used to manage this object * - * @param string $mode the mode of operation: live or test - * @param array $paymentProcessor the details of the payment processor being invoked - * @param CRM_Core_Form $paymentForm reference to the form object if available - * @param boolean $force should we force a reload of this payment object + * @param string $mode + * The mode of operation: live or test. + * @param array $paymentProcessor + * The details of the payment processor being invoked. + * @param CRM_Core_Form $paymentForm + * Reference to the form object if available. + * @param bool $force + * Should we force a reload of this payment object. * * @return object * @static @@ -48,7 +52,8 @@ class test_extension_manager_paymenttest extends CRM_Core_Payment { * This function collects all the information from a web/api form and invokes * the relevant payment processor specific functions to perform the transaction * - * @param array $params assoc array of input parameters for this transaction + * @param array $params + * Assoc array of input parameters for this transaction. * * @return array the result in an nice formatted array (or an error object) * @abstract diff --git a/tests/extensions/test.extension.manager.searchtest/main.php b/tests/extensions/test.extension.manager.searchtest/main.php index d0e7907dbd..0bcaa1afe1 100644 --- a/tests/extensions/test.extension.manager.searchtest/main.php +++ b/tests/extensions/test.extension.manager.searchtest/main.php @@ -16,7 +16,8 @@ class test_extension_manager_searchtest extends CRM_Contact_Form_Search_Custom_B /** * Prepare a set of search fields * - * @param CRM_Core_Form $form modifiable + * @param CRM_Core_Form $form + * Modifiable. * @return void */ function buildForm(&$form) { @@ -178,7 +179,8 @@ class test_extension_manager_searchtest extends CRM_Contact_Form_Search_Custom_B /** * Modify the content of each row * - * @param array $row modifiable SQL result row + * @param array $row + * Modifiable SQL result row. * @return void */ function alterRow(&$row) { diff --git a/tests/phpunit/CRM/Contact/BAO/ContactTest.php b/tests/phpunit/CRM/Contact/BAO/ContactTest.php index a1fffabc17..af8525b718 100644 --- a/tests/phpunit/CRM/Contact/BAO/ContactTest.php +++ b/tests/phpunit/CRM/Contact/BAO/ContactTest.php @@ -1561,7 +1561,8 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase { * Create a contact and perform a series of steps with it; after each * step, ensure that the contact's modified_date has increased. * - * @param $callbacks array ($name => $callable) + * @param $callbacks + * Array ($name => $callable). */ public function _testTimestamps($callbacks) { CRM_Core_DAO::triggerRebuild(); diff --git a/tests/phpunit/CRM/Contact/BAO/GroupContactCacheTest.php b/tests/phpunit/CRM/Contact/BAO/GroupContactCacheTest.php index 1995dc0aa0..0fda158d4c 100644 --- a/tests/phpunit/CRM/Contact/BAO/GroupContactCacheTest.php +++ b/tests/phpunit/CRM/Contact/BAO/GroupContactCacheTest.php @@ -164,8 +164,10 @@ class CRM_Contact_BAO_GroupContactCacheTest extends CiviUnitTestCase { /** * Assert that the cache for a group contains exactly the listed contacts * - * @param $expectedContactIds array(int) - * @param $groupId int + * @param $expectedContactIds + * Array(int). + * @param $groupId + * Int. */ public function assertCacheMatches($expectedContactIds, $groupId) { $sql = 'SELECT contact_id FROM civicrm_group_contact_cache WHERE group_id = %1'; @@ -226,7 +228,8 @@ class CRM_Contact_BAO_GroupContactCacheTest extends CiviUnitTestCase { } /** - * @param $objects array DAO or BAO objects + * @param $objects + * Array DAO or BAO objects. */ public function registerTestObjects($objects) { //if (is_object($objects)) { diff --git a/tests/phpunit/CRM/Core/BAO/ActionScheduleTest.php b/tests/phpunit/CRM/Core/BAO/ActionScheduleTest.php index fb590af9c5..a1467ea9c8 100644 --- a/tests/phpunit/CRM/Core/BAO/ActionScheduleTest.php +++ b/tests/phpunit/CRM/Core/BAO/ActionScheduleTest.php @@ -914,7 +914,8 @@ class CRM_Core_BAO_ActionScheduleTest extends CiviUnitTestCase { } /** - * @param $objects array DAO or BAO objects + * @param $objects + * Array DAO or BAO objects. */ public function registerTestObjects($objects) { //if (is_object($objects)) { diff --git a/tests/phpunit/CRM/Core/BAO/UFFieldTest.php b/tests/phpunit/CRM/Core/BAO/UFFieldTest.php index 5063ea3caf..70bdcfc339 100644 --- a/tests/phpunit/CRM/Core/BAO/UFFieldTest.php +++ b/tests/phpunit/CRM/Core/BAO/UFFieldTest.php @@ -184,7 +184,8 @@ class CRM_Core_BAO_UFFieldTest extends CiviUnitTestCase { } // */ /** - * @param array $fields list of fields to include in the profile + * @param array $fields + * List of fields to include in the profile. * @return int field id */ protected function createUFGroup($fields) { diff --git a/tests/phpunit/CRM/Core/CommunityMessagesTest.php b/tests/phpunit/CRM/Core/CommunityMessagesTest.php index 6250f90769..9998c0ce80 100644 --- a/tests/phpunit/CRM/Core/CommunityMessagesTest.php +++ b/tests/phpunit/CRM/Core/CommunityMessagesTest.php @@ -224,7 +224,8 @@ class CRM_Core_CommunityMessagesTest extends CiviUnitTestCase { * Store the NACK and retry after the default time period (DEFAULT_RETRY). * * @dataProvider badWebResponses - * @param array $badWebResponse Description of a web request that returns some kind of failure + * @param array $badWebResponse + * Description of a web request that returns some kind of failure. */ public function testGetDocument_NewFailure_CacheOK_UpdateOK($badWebResponse) { $this->assertNotEmpty($badWebResponse); @@ -268,7 +269,8 @@ class CRM_Core_CommunityMessagesTest extends CiviUnitTestCase { * A new update succeeds. * * @dataProvider badWebResponses - * @param array $badWebResponse Description of a web request that returns some kind of failure + * @param array $badWebResponse + * Description of a web request that returns some kind of failure. */ public function testGetDocument_NewOK_UpdateFailure_CacheOK_UpdateOK($badWebResponse) { $this->assertNotEmpty($badWebResponse); diff --git a/tests/phpunit/CRM/Core/Page/RedirectTest.php b/tests/phpunit/CRM/Core/Page/RedirectTest.php index e7268a0096..e5977e0ae7 100644 --- a/tests/phpunit/CRM/Core/Page/RedirectTest.php +++ b/tests/phpunit/CRM/Core/Page/RedirectTest.php @@ -34,10 +34,14 @@ class CRM_Core_Page_RedirectTest extends CiviUnitTestCase { * Note: Expected URL is htmlized because that's what CRM_Utils_System::url() * and CRM_Utils_System::redirect() work with. * - * @param string $requestPath eg "civicrm/requested/path" - * @param string $requestArgs eg "foo=bar&whiz=bang" - * @param string $pageArgs eg "url=civicrm/foo/bar?whiz=bang" - * @param string $expectedUrl eg "/index.php?q=civicrm/foo/bar&whiz=bang" + * @param string $requestPath + * Eg "civicrm/requested/path". + * @param string $requestArgs + * Eg "foo=bar&whiz=bang". + * @param string $pageArgs + * Eg "url=civicrm/foo/bar?whiz=bang". + * @param string $expectedUrl + * Eg "/index.php?q=civicrm/foo/bar&whiz=bang". * @dataProvider examples */ public function testCreateUrl($requestPath, $requestArgs, $pageArgs, $expectedUrl) { diff --git a/tests/phpunit/CRM/Core/Permission/BaseTest.php b/tests/phpunit/CRM/Core/Permission/BaseTest.php index 54e6de6cd9..0cd732520d 100644 --- a/tests/phpunit/CRM/Core/Permission/BaseTest.php +++ b/tests/phpunit/CRM/Core/Permission/BaseTest.php @@ -27,8 +27,10 @@ class CRM_Core_Permission_BaseTest extends CiviUnitTestCase { /** * @dataProvider translateData - * @param string $input the name of a permission which should be translated - * @param string $expected the name of an actual permission (based on translation matrix for "runtime") + * @param string $input + * The name of a permission which should be translated. + * @param string $expected + * The name of an actual permission (based on translation matrix for "runtime"). */ public function testTranslate($input, $expected) { $perm = new CRM_Core_Permission_Base(); diff --git a/tests/phpunit/CRM/Core/Permission/JoomlaTest.php b/tests/phpunit/CRM/Core/Permission/JoomlaTest.php index d2f49855a1..a98f46d7ea 100644 --- a/tests/phpunit/CRM/Core/Permission/JoomlaTest.php +++ b/tests/phpunit/CRM/Core/Permission/JoomlaTest.php @@ -30,8 +30,10 @@ class CRM_Core_Permission_JoomlaTest extends CiviUnitTestCase { /** * @dataProvider translateData - * @param string $input the name of a permission which should be translated - * @param string $expected the name of an actual permission (based on translation matrix for "runtime") + * @param string $input + * The name of a permission which should be translated. + * @param string $expected + * The name of an actual permission (based on translation matrix for "runtime"). */ public function testTranslate($input, $expected) { $perm = new CRM_Core_Permission_Joomla(); diff --git a/tests/phpunit/CRM/Core/TransactionTest.php b/tests/phpunit/CRM/Core/TransactionTest.php index 41d88bfacf..1f8a1a68f0 100644 --- a/tests/phpunit/CRM/Core/TransactionTest.php +++ b/tests/phpunit/CRM/Core/TransactionTest.php @@ -44,8 +44,10 @@ class CRM_Core_TransactionTest extends CiviUnitTestCase { } /** - * @param string $createStyle 'sql-insert'|'bao-create' - * @param string $commitStyle 'implicit-commit'|'explicit-commit' + * @param string $createStyle + * 'sql-insert'|'bao-create'. + * @param string $commitStyle + * 'implicit-commit'|'explicit-commit'. * @dataProvider dataCreateAndCommitStyles */ public function testBasicCommit($createStyle, $commitStyle) { @@ -67,8 +69,10 @@ class CRM_Core_TransactionTest extends CiviUnitTestCase { * Test in which an outer function makes multiple calls to inner functions * but then rolls back the entire set. * - * @param string $createStyle 'sql-insert'|'bao-create' - * @param string $commitStyle 'implicit-commit'|'explicit-commit' + * @param string $createStyle + * 'sql-insert'|'bao-create'. + * @param string $commitStyle + * 'implicit-commit'|'explicit-commit'. * @dataProvider dataCreateAndCommitStyles */ public function testBatchRollback($createStyle, $commitStyle) { @@ -91,8 +95,10 @@ class CRM_Core_TransactionTest extends CiviUnitTestCase { * createContactWithTransaction use nesting (savepoints), so the * batch is able to commit. * - * @param string $createStyle 'sql-insert'|'bao-create' - * @param string $commitStyle 'implicit-commit'|'explicit-commit' + * @param string $createStyle + * 'sql-insert'|'bao-create'. + * @param string $commitStyle + * 'implicit-commit'|'explicit-commit'. * @dataProvider dataCreateAndCommitStyles */ public function testMixedBatchCommit_nesting($createStyle, $commitStyle) { @@ -116,8 +122,10 @@ class CRM_Core_TransactionTest extends CiviUnitTestCase { * createContactWithTransaction reuses the main transaction, * so the overall batch must rollback. * - * @param string $createStyle 'sql-insert'|'bao-create' - * @param string $commitStyle 'implicit-commit'|'explicit-commit' + * @param string $createStyle + * 'sql-insert'|'bao-create'. + * @param string $commitStyle + * 'implicit-commit'|'explicit-commit'. * @dataProvider dataCreateAndCommitStyles */ public function testMixedBatchCommit_reuse($createStyle, $commitStyle) { @@ -140,8 +148,10 @@ class CRM_Core_TransactionTest extends CiviUnitTestCase { * createContactWithTransaction using a mix of rollback/commit. * The overall batch is rolled back. * - * @param string $createStyle 'sql-insert'|'bao-create' - * @param string $commitStyle 'implicit-commit'|'explicit-commit' + * @param string $createStyle + * 'sql-insert'|'bao-create'. + * @param string $commitStyle + * 'implicit-commit'|'explicit-commit'. * @dataProvider dataCreateAndCommitStyles */ public function testMixedBatchRollback_nesting($createStyle, $commitStyle) { @@ -223,8 +233,10 @@ class CRM_Core_TransactionTest extends CiviUnitTestCase { } /** - * @param string $createStyle 'sql-insert'|'bao-create' - * @param string $commitStyle 'implicit-commit'|'explicit-commit' + * @param string $createStyle + * 'sql-insert'|'bao-create'. + * @param string $commitStyle + * 'implicit-commit'|'explicit-commit'. * @dataProvider dataCreateAndCommitStyles */ public function testRun_ok($createStyle, $commitStyle) { @@ -237,8 +249,10 @@ class CRM_Core_TransactionTest extends CiviUnitTestCase { } /** - * @param string $createStyle 'sql-insert'|'bao-create' - * @param string $commitStyle 'implicit-commit'|'explicit-commit' + * @param string $createStyle + * 'sql-insert'|'bao-create'. + * @param string $commitStyle + * 'implicit-commit'|'explicit-commit'. * @dataProvider dataCreateAndCommitStyles */ public function testRun_exception($createStyle, $commitStyle) { @@ -275,7 +289,8 @@ class CRM_Core_TransactionTest extends CiviUnitTestCase { } /** - * @param array $existsByOffset array(int $cidOffset => bool $expectExists) + * @param array $existsByOffset + * Array(int $cidOffset => bool $expectExists). * @param int $generalOffset */ public function assertContactsExistByOffset($existsByOffset, $generalOffset = 0) { @@ -293,9 +308,12 @@ class CRM_Core_TransactionTest extends CiviUnitTestCase { * Use SQL to INSERT a contact and assert success. Perform * work within a transaction. * - * @param string $nesting 'reuse-tx'|'nest-tx' how to construct transaction - * @param string $insert 'sql-insert'|'bao-create' how to add the example record - * @param string $outcome 'rollback'|'implicit-commit'|'explicit-commit' how to finish transaction + * @param string $nesting + * 'reuse-tx'|'nest-tx' how to construct transaction. + * @param string $insert + * 'sql-insert'|'bao-create' how to add the example record. + * @param string $outcome + * 'rollback'|'implicit-commit'|'explicit-commit' how to finish transaction. * @return int cid */ public function createContactWithTransaction($nesting, $insert, $outcome) { @@ -340,10 +358,14 @@ class CRM_Core_TransactionTest extends CiviUnitTestCase { /** * Perform a series of operations within smaller transactions * - * @param string $nesting 'reuse-tx'|'nest-tx' how to construct transaction - * @param array $callbacks see createContactWithTransaction - * @param array $existsByOffset see assertContactsMix - * @param string $outcome 'rollback'|'implicit-commit'|'explicit-commit' how to finish transaction + * @param string $nesting + * 'reuse-tx'|'nest-tx' how to construct transaction. + * @param array $callbacks + * See createContactWithTransaction. + * @param array $existsByOffset + * See assertContactsMix. + * @param string $outcome + * 'rollback'|'implicit-commit'|'explicit-commit' how to finish transaction. * @return int cid */ public function runBatch($nesting, $callbacks, $existsByOffset, $outcome) { diff --git a/tests/phpunit/CRM/Extension/Manager/ModuleTest.php b/tests/phpunit/CRM/Extension/Manager/ModuleTest.php index c3224d9b50..95c350a150 100644 --- a/tests/phpunit/CRM/Extension/Manager/ModuleTest.php +++ b/tests/phpunit/CRM/Extension/Manager/ModuleTest.php @@ -219,7 +219,8 @@ class CRM_Extension_Manager_ModuleTest extends CiviUnitTestCase { /** * @param $module - * @param array $counts expected hook invocation counts ($hookName => $count) + * @param array $counts + * Expected hook invocation counts ($hookName => $count). */ public function assertHookCounts($module, $counts) { global $_test_extension_manager_moduletest_counts; diff --git a/tests/phpunit/CRM/Group/Page/AjaxTest.php b/tests/phpunit/CRM/Group/Page/AjaxTest.php index 2c9dee004e..d92c4ea4fd 100644 --- a/tests/phpunit/CRM/Group/Page/AjaxTest.php +++ b/tests/phpunit/CRM/Group/Page/AjaxTest.php @@ -417,7 +417,7 @@ class CRM_Group_Page_AjaxTest extends CiviUnitTestCase { * Implements ACLGroup hook * aclGroup function returns a list of permitted groups * @param string $type - * @param integer $contactID + * @param int $contactID * @param string $tableName * @param array $allGroups * @param array $currentGroups diff --git a/tests/phpunit/CRM/Utils/API/MatchOptionTest.php b/tests/phpunit/CRM/Utils/API/MatchOptionTest.php index 17e657235c..1e4cc39a2b 100644 --- a/tests/phpunit/CRM/Utils/API/MatchOptionTest.php +++ b/tests/phpunit/CRM/Utils/API/MatchOptionTest.php @@ -95,7 +95,8 @@ class CRM_Utils_API_MatchOptionTest extends CiviUnitTestCase { * If there's one pre-existing record, then update it. * * @dataProvider apiOptionNames - * @param string $apiOptionName e.g. "match" or "match-mandatory" + * @param string $apiOptionName + * E.g. "match" or "match-mandatory". */ public function testCreateMatch_one($apiOptionName) { // create basic record @@ -133,7 +134,8 @@ class CRM_Utils_API_MatchOptionTest extends CiviUnitTestCase { * If there's more than one pre-existing record, throw an error. * * @dataProvider apiOptionNames - * @param string $apiOptionName e.g. "match" or "match-mandatory" + * @param string $apiOptionName + * E.g. "match" or "match-mandatory". */ public function testCreateMatch_many($apiOptionName) { // create the first Lebowski diff --git a/tests/phpunit/CRM/Utils/StringTest.php b/tests/phpunit/CRM/Utils/StringTest.php index 683f866736..fd32bc9cba 100644 --- a/tests/phpunit/CRM/Utils/StringTest.php +++ b/tests/phpunit/CRM/Utils/StringTest.php @@ -148,7 +148,8 @@ class CRM_Utils_StringTest extends CiviUnitTestCase { /** * @param $input - * @param $expected bool + * @param $expected + * Bool. * @dataProvider booleanDataProvider */ public function testStrToBool($input, $expected) { diff --git a/tests/phpunit/Civi/API/KernelTest.php b/tests/phpunit/Civi/API/KernelTest.php index 2039b446ce..7b6bfa2e71 100644 --- a/tests/phpunit/Civi/API/KernelTest.php +++ b/tests/phpunit/Civi/API/KernelTest.php @@ -91,7 +91,8 @@ class KernelTest extends \CiviUnitTestCase { * Add listeners to $this->dispatcher which record each invocation of $monitoredEvents * in $this->actualEventSequence. * - * @param array $monitoredEvents list of event names + * @param array $monitoredEvents + * List of event names. * * @internal param \Symfony\Component\EventDispatcher\EventDispatcher $this ->dispatcher */ diff --git a/tests/phpunit/CiviTest/AuthorizeNet.php b/tests/phpunit/CiviTest/AuthorizeNet.php index 363069205d..9c05fcddd5 100644 --- a/tests/phpunit/CiviTest/AuthorizeNet.php +++ b/tests/phpunit/CiviTest/AuthorizeNet.php @@ -34,7 +34,8 @@ class AuthorizeNet extends PHPUnit_Framework_Testcase { /** * Helper function to delete a PayPal Pro * payment processor - * @param int $id - id of the PayPal Pro payment processor + * @param int $id + * Id of the PayPal Pro payment processor. * to be deleted * @return boolean true if payment processor deleted, false otherwise * diff --git a/tests/phpunit/CiviTest/CiviMailUtils.php b/tests/phpunit/CiviTest/CiviMailUtils.php index d8d77caadb..a298e00de0 100644 --- a/tests/phpunit/CiviTest/CiviMailUtils.php +++ b/tests/phpunit/CiviTest/CiviMailUtils.php @@ -62,7 +62,8 @@ class CiviMailUtils extends PHPUnit_Framework_TestCase { * Constructor * * @param CiviSeleniumTestCase|CiviUnitTestCase $unit_test The currently running test - * @param bool $startImmediately Start writing to db now or wait until start() is called + * @param bool $startImmediately + * Start writing to db now or wait until start() is called. */ public function __construct(&$unit_test, $startImmediately = TRUE) { $this->_ut = $unit_test; @@ -188,7 +189,8 @@ class CiviMailUtils extends PHPUnit_Framework_TestCase { } /** - * @param string $type 'raw'|'ezc' + * @param string $type + * 'raw'|'ezc'. * * @throws Exception * @return array(ezcMail)|array(string) @@ -246,8 +248,10 @@ class CiviMailUtils extends PHPUnit_Framework_TestCase { /** * Check contents of mail log * - * @param array $strings strings that should be included - * @param array $absentStrings strings that should not be included + * @param array $strings + * Strings that should be included. + * @param array $absentStrings + * Strings that should not be included. * @param string $prefix * * @return \ezcMail|string @@ -275,7 +279,8 @@ class CiviMailUtils extends PHPUnit_Framework_TestCase { /** * Assert that $expectedRecipients (and no else) have received emails * - * @param array $expectedRecipients array($msgPos => array($recipPos => $emailAddr)) + * @param array $expectedRecipients + * Array($msgPos => array($recipPos => $emailAddr)). */ public function assertRecipients($expectedRecipients) { $recipients = array(); @@ -304,7 +309,8 @@ class CiviMailUtils extends PHPUnit_Framework_TestCase { } /** - * @param string $msg email header and body + * @param string $msg + * Email header and body. * @return ezcMail */ private function convertToEzc($msg) { diff --git a/tests/phpunit/CiviTest/CiviReportTestCase.php b/tests/phpunit/CiviTest/CiviReportTestCase.php index 7e266ad929..1a1d30c74d 100644 --- a/tests/phpunit/CiviTest/CiviReportTestCase.php +++ b/tests/phpunit/CiviTest/CiviReportTestCase.php @@ -117,8 +117,10 @@ class CiviReportTestCase extends CiviUnitTestCase { } /** - * @param array $expectedCsvArray two-dimensional array representing a CSV table - * @param array $actualCsvArray two-dimensional array representing a CSV table + * @param array $expectedCsvArray + * Two-dimensional array representing a CSV table. + * @param array $actualCsvArray + * Two-dimensional array representing a CSV table. */ public function assertCsvArraysEqual($expectedCsvArray, $actualCsvArray) { // TODO provide better debug output diff --git a/tests/phpunit/CiviTest/CiviSeleniumTestCase.php b/tests/phpunit/CiviTest/CiviSeleniumTestCase.php index 9f109a5935..17b85ed691 100644 --- a/tests/phpunit/CiviTest/CiviSeleniumTestCase.php +++ b/tests/phpunit/CiviTest/CiviSeleniumTestCase.php @@ -58,9 +58,9 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { * ReflectionClass of the Test class and checks the constructor * of that class to decide how to set up the test. * - * @param string $name - * @param array $data - * @param string $dataName + * @param string $name + * @param array $data + * @param string $dataName * @param array $browser */ public function __construct($name = NULL, array$data = array(), $dataName = '', array$browser = array()) { @@ -119,7 +119,8 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { } /** - * @param array $cookies each item is an array with keys: + * @param array $cookies + * Each item is an array with keys:. * - name: string * - value: string; note that RFC's don't define particular encoding scheme, so * you must pick one yourself and pre-encode; does not allow values with @@ -190,9 +191,12 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { /** * Open an internal path beginning with 'civicrm/' * - * @param $url (str) omit the 'civicrm/' it will be added for you - * @param $args (str|array) optional url arguments - * @param $waitFor - page element to wait for - using this is recommended to ensure the document is fully loaded + * @param $url + * (str) omit the 'civicrm/' it will be added for you. + * @param $args + * (str|array) optional url arguments. + * @param $waitFor + * Page element to wait for - using this is recommended to ensure the document is fully loaded. * * Although it doesn't seem to do much now, using this function is recommended for * opening all civi pages, and using the $args param is also strongly encouraged @@ -411,9 +415,12 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { * Add a contact with the given first and last names and either a given email * (when specified), a random email (when true) or no email (when unspecified or null). * - * @param string $fname contact’s first name - * @param string $lname contact’s last name - * @param mixed $email contact’s email (when string) or random email (when true) or no email (when null) + * @param string $fname + * Contact’s first name. + * @param string $lname + * Contact’s last name. + * @param mixed $email + * Contact’s email (when string) or random email (when true) or no email (when null). * * @param null $contactSubtype * @@ -553,10 +560,13 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { /** * Verify that given label/value pairs are in *sibling* td cells somewhere on the page. * - * @param array $expected Array of key/value pairs (like Status/Registered) to be checked - * @param string $xpathPrefix Pass in an xpath locator to "get to" the desired table or tables. Will be prefixed to xpath + * @param array $expected + * Array of key/value pairs (like Status/Registered) to be checked. + * @param string $xpathPrefix + * Pass in an xpath locator to "get to" the desired table or tables. Will be prefixed to xpath. * table path. Include leading forward slashes (e.g. "//div[@id='activity-content']"). - * @param string $tableId Pass in the id attribute of a table to be verified if you want to only check a specific table + * @param string $tableId + * Pass in the id attribute of a table to be verified if you want to only check a specific table. * on the web page. */ public function webtestVerifyTabularData($expected, $xpathPrefix = NULL, $tableId = NULL) { @@ -579,9 +589,12 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { /** * Types text into a ckEditor rich text field in a form * - * @param string $fieldName form field name (as assigned by PHP buildForm class) - * @param string $text text to type into the field - * @param string $editor which text editor (valid values are 'CKEditor', 'TinyMCE') + * @param string $fieldName + * Form field name (as assigned by PHP buildForm class). + * @param string $text + * Text to type into the field. + * @param string $editor + * Which text editor (valid values are 'CKEditor', 'TinyMCE'). * * @return void */ @@ -610,8 +623,10 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { * (for price set fields of type select, radio, or checkbox) * TODO: extend for custom field multiple choice table input * - * @param array $options form field name (as assigned by PHP buildForm class) - * @param array $validateStrings appends label and name strings to this array so they can be validated later + * @param array $options + * Form field name (as assigned by PHP buildForm class). + * @param array $validateStrings + * Appends label and name strings to this array so they can be validated later. * * @return void */ @@ -633,7 +648,8 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { /** * Use a contact EntityRef field to add a new contact - * @param string $field selector + * @param string $field + * Selector. * @param string $contactType * @return array of contact attributes (id, names, email) */ @@ -753,9 +769,12 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { * Define a payment processor for use by a webtest. Default is to create Dummy processor * which is useful for testing online public forms (online contribution pages and event registration) * - * @param string $processorName Name assigned to new processor - * @param string $processorType Name for processor type (e.g. PayPal, Dummy, etc.) - * @param array $processorSettings Array of fieldname => value for required settings for the processor + * @param string $processorName + * Name assigned to new processor. + * @param string $processorType + * Name for processor type (e.g. PayPal, Dummy, etc.). + * @param array $processorSettings + * Array of fieldname => value for required settings for the processor. * * @param string $financialAccount * @throws PHPUnit_Framework_AssertionFailedError @@ -933,7 +952,8 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { /** * Create new relationship type w/ user specified params or default. * - * @param $params array of required params. + * @param $params + * Array of required params. * * @return an array of saved params values. */ @@ -1334,8 +1354,10 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { * Update default strict rule. * * @param string $contactType - * @param array $fields Fields to be set for strict rule - * @param int $threshold Rule's threshold value + * @param array $fields + * Fields to be set for strict rule. + * @param int $threshold + * Rule's threshold value. */ public function webtestStrictDedupeRuleDefault($contactType = 'Individual', $fields = array(), $threshold = 10) { // set default strict rule. @@ -2072,13 +2094,15 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { * checks custom fields rendering / loading properly on the fly WRT entity passed as parameter * * - * @param array $customSets custom sets i.e entity wise sets want to be created and checked + * @param array $customSets + * Custom sets i.e entity wise sets want to be created and checked. e.g $customSets = array(array('entity' => 'Contribution', 'subEntity' => 'Donation', 'triggerElement' => $triggerElement)) array $triggerElement: the element which is responsible for custom group to load which uses the entity info as its selection value - * @param array $pageUrl the url which on which the ajax custom group load takes place + * @param array $pageUrl + * The url which on which the ajax custom group load takes place. * @param callable|boolean $beforeTriggering fn to execute before actual element triggering * @return void */ diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index b0635af740..21faf54560 100755 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -162,9 +162,9 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { * ReflectionClass of the Test class and checks the constructor * of that class to decide how to set up the test. * - * @param string $name - * @param array $data - * @param string $dataName + * @param string $name + * @param array $data + * @param string $dataName */ public function __construct($name = NULL, array$data = array(), $dataName = '') { parent::__construct($name, $data, $dataName); @@ -781,8 +781,10 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { /** * Check that api returned 'is_error' => 0 * else provide full message - * @param array $apiResult api result - * @param string $prefix extra test to add to message + * @param array $apiResult + * Api result. + * @param string $prefix + * Extra test to add to message. */ public function assertAPISuccess($apiResult, $prefix = '') { if (!empty($prefix)) { @@ -803,8 +805,10 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { * Check that api returned 'is_error' => 1 * else provide full message * - * @param array $apiResult api result - * @param string $prefix extra test to add to message + * @param array $apiResult + * Api result. + * @param string $prefix + * Extra test to add to message. * @param null $expectedError */ public function assertAPIFailure($apiResult, $prefix = '', $expectedError = NULL) { @@ -841,7 +845,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { * @param array $result * @param $expected * @param array $valuesToExclude - * @param string $prefix extra test to add to message + * @param string $prefix + * Extra test to add to message. */ public function assertAPIArrayComparison($result, $expected, $valuesToExclude = array(), $prefix = '') { $valuesToExclude = array_merge($valuesToExclude, array('debug', 'xdebug', 'sequential')); @@ -875,7 +880,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { * @param string $entity * @param string $action * @param array $params - * @param mixed $checkAgainst optional value to check result against, implemented for getvalue, + * @param mixed $checkAgainst + * Optional value to check result against, implemented for getvalue,. * getcount, getsingle. Note that for getvalue the type is checked rather than the value * for getsingle the array is compared against an array passed in - the id is not compared (for * better or worse ) @@ -909,7 +915,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { * * @param string $entity * @param array $params - * @param string $type - per http://php.net/manual/en/function.gettype.php possible types + * @param string $type + * Per http://php.net/manual/en/function.gettype.php possible types. * - boolean * - integer * - double @@ -943,7 +950,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { * * @param string $entity * @param array $params - * @param array $checkAgainst - array to compare result against + * @param array $checkAgainst + * Array to compare result against. * - boolean * - integer * - double @@ -1002,8 +1010,10 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { * @param string $entity * @param string $action * @param array $params - * @param string $function - pass this in to create a generated example - * @param string $file - pass this in to create a generated example + * @param string $function + * Pass this in to create a generated example. + * @param string $file + * Pass this in to create a generated example. * @param string $description * @param string|null $subfile * @param string|null $actionName @@ -1022,7 +1032,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { * @param string $entity * @param string $action * @param array $params - * @param string $expectedErrorMessage error + * @param string $expectedErrorMessage + * Error. * @param null $extraOutput * @return array|int */ @@ -1052,8 +1063,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { /** * Generic function to create Organisation, to be used in test cases * - * @param array parameters for civicrm_contact_add api function call - * @param int sequence number if creating multiple organizations + * @param array parameters for civicrm_contact_add api function call + * @param int sequence number if creating multiple organizations * * @return int id of Organisation created */ @@ -1068,8 +1079,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { /** * Generic function to create Individual, to be used in test cases * - * @param array parameters for civicrm_contact_add api function call - * @param int sequence number if creating multiple individuals + * @param array parameters for civicrm_contact_add api function call + * @param int sequence number if creating multiple individuals * * @return int id of Individual created */ @@ -1081,8 +1092,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { /** * Generic function to create Household, to be used in test cases * - * @param array parameters for civicrm_contact_add api function call - * @param int sequence number if creating multiple households + * @param array parameters for civicrm_contact_add api function call + * @param int sequence number if creating multiple households * * @return int id of Household created */ @@ -1094,8 +1105,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { /** * Helper function for getting sample contact properties * - * @param enum contact type: Individual, Organization - * @param int sequence number for the values of this type + * @param enum contact type: Individual, Organization + * @param int sequence number for the values of this type * * @return array properties of sample contact (ie. $params for API call) */ @@ -1131,7 +1142,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { /** * Private helper function for calling civicrm_contact_add * - * @param array $params for civicrm_contact_add api function call + * @param array $params + * For civicrm_contact_add api function call. * * @throws Exception * @@ -1339,7 +1351,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { /** * Create Participant * - * @param array $params array of contact id and event id values + * @param array $params + * Array of contact id and event id values. * * @return int $id of participant created */ @@ -1428,7 +1441,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { /** * Delete Tag * - * @param int $tagId id of the tag to be deleted + * @param int $tagId + * Id of the tag to be deleted. */ public function tagDelete($tagId) { require_once 'api/api.php'; @@ -1442,7 +1456,7 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { /** * Add entity(s) to the tag * - * @param array $params + * @param array $params * * @return bool */ @@ -1454,7 +1468,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { /** * Create contribution * - * @param int $cID contact_id + * @param int $cID + * Contact_id. * * @return int id of created contribution */ @@ -1493,8 +1508,10 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { /** * Create contribution * - * @param int $cID contact_id - * @param int $cTypeID id of financial type + * @param int $cID + * Contact_id. + * @param int $cTypeID + * Id of financial type. * * @param int $invoiceID * @param int $trxnID @@ -1531,7 +1548,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { * Create online contribution * * @param array $params - * @param int $financialType id of financial type + * @param int $financialType + * Id of financial type. * * @param int $invoiceID * @param int $trxnID @@ -1572,7 +1590,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { /** * Create an Event * - * @param array $params name-value pair for an event + * @param array $params + * Name-value pair for an event. * * @return array $event */ @@ -1611,7 +1630,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { /** * Delete event * - * @param int $id ID of the event + * @param int $id + * ID of the event. * * @return array|int */ @@ -1700,7 +1720,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { /** * Delete Locations of contact * - * @param array $params parameters + * @param array $params + * Parameters. */ public function locationDelete($params) { $this->callAPISuccess('Location', 'delete', $params); @@ -1938,7 +1959,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { /** * Create an activity type * - * @param array $params parameters + * @param array $params + * Parameters. */ public function activityTypeCreate($params) { $result = $this->callAPISuccess('ActivityType', 'create', $params); @@ -1948,7 +1970,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { /** * Delete activity type * - * @param int $activityTypeId id of the activity type + * @param int $activityTypeId + * Id of the activity type. */ public function activityTypeDelete($activityTypeId) { $params['activity_type_id'] = $activityTypeId; @@ -2037,8 +2060,10 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { * Create a custom group with a single text custom field. See * participant:testCreateWithCustom for how to use this * - * @param string $function __FUNCTION__ - * @param $filename string $file __FILE__ + * @param string $function + * __FUNCTION__. + * @param $filename + * String $file __FILE__. * * @return array $ids ids of created objects */ @@ -2068,7 +2093,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { /** * Create custom field * - * @param array $params (custom_group_id) is required + * @param array $params + * (custom_group_id) is required. * @return array|int */ public function customFieldCreate($params) { @@ -2139,13 +2165,20 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { * To turn this off (e.g. on the server) set * define(DONT_DOCUMENT_TEST_CONFIG ,1); * in your settings file - * @param array $params array as passed to civicrm_api function - * @param array $result array as received from the civicrm_api function - * @param string $function calling function - generally __FUNCTION__ - * @param string $filename called from file - generally __FILE__ - * @param string $description descriptive text for the example file - * @param string $subfile name for subfile - if this is completed the example will be put in a subfolder (named by the entity) - * @param string $action - optional action - otherwise taken from function name + * @param array $params + * Array as passed to civicrm_api function. + * @param array $result + * Array as received from the civicrm_api function. + * @param string $function + * Calling function - generally __FUNCTION__. + * @param string $filename + * Called from file - generally __FILE__. + * @param string $description + * Descriptive text for the example file. + * @param string $subfile + * Name for subfile - if this is completed the example will be put in a subfolder (named by the entity). + * @param string $action + * Optional action - otherwise taken from function name. */ public function documentMe($params, $result, $function, $filename, $description = "", $subfile = NULL, $action = NULL) { if (defined('DONT_DOCUMENT_TEST_CONFIG') && DONT_DOCUMENT_TEST_CONFIG) { @@ -2344,7 +2377,8 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { * Create custom field with Option Values * * @param array $customGroup - * @param string $name name of custom field + * @param string $name + * Name of custom field. * * @return array|int */ @@ -2476,11 +2510,16 @@ AND ( TABLE_NAME LIKE 'civicrm_value_%' ) /* * Function does a 'Get' on the entity & compares the fields in the Params with those returned * Default behaviour is to also delete the entity - * @param array $params params array to check agains - * @param int $id id of the entity concerned - * @param string $entity name of entity concerned (e.g. membership) - * @param bool $delete should the entity be deleted as part of this check - * @param string $errorText text to print on error + * @param array $params + * Params array to check agains. + * @param int $id + * Id of the entity concerned. + * @param string $entity + * Name of entity concerned (e.g. membership). + * @param bool $delete + * Should the entity be deleted as part of this check. + * @param string $errorText + * Text to print on error. * */ /** @@ -2555,8 +2594,10 @@ AND ( TABLE_NAME LIKE 'civicrm_value_%' ) /** * Get formatted values in the actual and expected result - * @param array $actual actual calculated values - * @param array $expected expected values + * @param array $actual + * Actual calculated values. + * @param array $expected + * Expected values. * */ public function checkArrayEquals(&$actual, &$expected) { @@ -2567,7 +2608,8 @@ AND ( TABLE_NAME LIKE 'civicrm_value_%' ) /** * Unset the key 'id' from the array - * @param array $unformattedArray The array from which the 'id' has to be unset + * @param array $unformattedArray + * The array from which the 'id' has to be unset. * */ public static function unsetId(&$unformattedArray) { @@ -2596,7 +2638,8 @@ AND ( TABLE_NAME LIKE 'civicrm_value_%' ) /** * Helper to enable/disable custom directory support * - * @param array $customDirs with members: + * @param array $customDirs + * With members:. * 'php_path' Set to TRUE to use the default, FALSE or "" to disable support, or a string path to use another path * 'template_path' Set to TRUE to use the default, FALSE or "" to disable support, or a string path to use another path */ @@ -3113,7 +3156,8 @@ AND ( TABLE_NAME LIKE 'civicrm_value_%' ) * WISHLIST: Monitor SQL queries in unit-tests and generate an exception * if TRUNCATE or ALTER is called while using a transaction. * - * @param bool $nest whether to use nesting or reference-counting + * @param bool $nest + * Whether to use nesting or reference-counting. */ public function useTransaction($nest = TRUE) { if (!$this->tx) { diff --git a/tests/phpunit/CiviTest/Contact.php b/tests/phpunit/CiviTest/Contact.php index 7d00f7ca27..8f0115d469 100644 --- a/tests/phpunit/CiviTest/Contact.php +++ b/tests/phpunit/CiviTest/Contact.php @@ -85,7 +85,8 @@ class Contact extends CiviUnitTestCase { /** * Helper function to delete a contact * - * @param int $contactID id of the contact to delete + * @param int $contactID + * Id of the contact to delete. * @return boolean true if contact deleted, false otherwise */ public static function delete($contactID) { diff --git a/tests/phpunit/CiviTest/ContributionPage.php b/tests/phpunit/CiviTest/ContributionPage.php index 3ff31f172d..0787305ef3 100644 --- a/tests/phpunit/CiviTest/ContributionPage.php +++ b/tests/phpunit/CiviTest/ContributionPage.php @@ -41,7 +41,8 @@ class ContributionPage extends PHPUnit_Framework_Testcase { /** * Helper function to delete a Contribution Page * - * @param int $contributionPageId - id of the Contribution Page + * @param int $contributionPageId + * Id of the Contribution Page. * to be deleted * @return boolean true if Contribution Page deleted, false otherwise */ diff --git a/tests/phpunit/CiviTest/Custom.php b/tests/phpunit/CiviTest/Custom.php index ad1d0edf8f..bcd956e176 100644 --- a/tests/phpunit/CiviTest/Custom.php +++ b/tests/phpunit/CiviTest/Custom.php @@ -99,7 +99,7 @@ class Custom extends CiviUnitTestCase { /** * Helper function to delete custom field * @deprecated use function on parent class - * @param object of Custom Field to delete + * @param object of Custom Field to delete */ public static function deleteField($params) { require_once 'CRM/Core/BAO/CustomField.php'; @@ -109,7 +109,7 @@ class Custom extends CiviUnitTestCase { /** * Helper function to delete custom group * @deprecated use function on parent class - * @param object Custom Group to delete + * @param object Custom Group to delete * @return boolean true if Group deleted, false otherwise */ public static function deleteGroup($params) { diff --git a/tests/phpunit/CiviTest/PCP.php b/tests/phpunit/CiviTest/PCP.php index 51740dbf66..acc353cc6b 100644 --- a/tests/phpunit/CiviTest/PCP.php +++ b/tests/phpunit/CiviTest/PCP.php @@ -7,7 +7,8 @@ class PCPBlock extends PHPUnit_Framework_Testcase { /** * Helper function to create a PCP Block for Contribution Page * - * @param int $contributionPageId - id of the Contribution Page + * @param int $contributionPageId + * Id of the Contribution Page. * to be deleted * @return array of created pcp block * @@ -90,7 +91,7 @@ class PCPBlock extends PHPUnit_Framework_Testcase { /** * Helper function to delete a PCP related stuff viz. Profile, PCP Block Entry * - * @param array key value pair + * @param array key value pair * pcpBlockId - id of the PCP Block Id, profileID - id of Supporter Profile * to be deleted * @return boolean true if success, false otherwise diff --git a/tests/phpunit/CiviTest/PaypalPro.php b/tests/phpunit/CiviTest/PaypalPro.php index 0ff57c40ea..1ce658b814 100644 --- a/tests/phpunit/CiviTest/PaypalPro.php +++ b/tests/phpunit/CiviTest/PaypalPro.php @@ -41,7 +41,8 @@ class PaypalPro extends PHPUnit_Framework_Testcase { /** * Helper function to delete a PayPal Pro * payment processor - * @param int $id - id of the PayPal Pro payment processor + * @param int $id + * Id of the PayPal Pro payment processor. * to be deleted * @return boolean true if payment processor deleted, false otherwise */ diff --git a/tests/phpunit/WebTest/Contact/InlineFieldsEditTest.php b/tests/phpunit/WebTest/Contact/InlineFieldsEditTest.php index 93f27d360c..6aa890b982 100644 --- a/tests/phpunit/WebTest/Contact/InlineFieldsEditTest.php +++ b/tests/phpunit/WebTest/Contact/InlineFieldsEditTest.php @@ -229,7 +229,8 @@ class WebTest_Contact_InlineFieldsEditTest extends CiviSeleniumTestCase { /** * Click on an inline-edit block and wait for it to open * - * @param $block string selector + * @param $block + * String selector. * @param bool $wait */ private function openInlineForm($block, $wait = TRUE) { @@ -243,8 +244,10 @@ class WebTest_Contact_InlineFieldsEditTest extends CiviSeleniumTestCase { /** * Enter values in an inline edit block and save * - * @param $block string selector - * @param $params array + * @param $block + * String selector. + * @param $params + * Array. * @param \str|string $valid str: submit behavior * 'error' if we are expecting a form validation error, * 're_open' (default) after saving, opens the form and validate inputs diff --git a/tests/phpunit/WebTest/Export/ExportCiviSeleniumTestCase.php b/tests/phpunit/WebTest/Export/ExportCiviSeleniumTestCase.php index b52b745892..a027787550 100644 --- a/tests/phpunit/WebTest/Export/ExportCiviSeleniumTestCase.php +++ b/tests/phpunit/WebTest/Export/ExportCiviSeleniumTestCase.php @@ -34,9 +34,12 @@ class ExportCiviSeleniumTestCase extends CiviSeleniumTestCase { /** * Download CSV file. * - * @param string $selector element selector(download button in most of the cases). - * @param string $fileName file name to be download. - * @param string $downloadDir download dir. + * @param string $selector + * Element selector(download button in most of the cases). + * @param string $fileName + * File name to be download. + * @param string $downloadDir + * Download dir. * * @return string downloaded file path. */ @@ -65,10 +68,13 @@ class ExportCiviSeleniumTestCase extends CiviSeleniumTestCase { /** * Read CSV file and fire provided assertions. * - * @param string $file file path of CSV file. - * @param array $checkColumns check first row of csv + * @param string $file + * File path of CSV file. + * @param array $checkColumns + * Check first row of csv. * independent of index. - * @param array $checkRows array of header and rows according to row index + * @param array $checkRows + * Array of header and rows according to row index. * eg: array( * 1 => array( // Row index 1 @@ -82,8 +88,10 @@ class ExportCiviSeleniumTestCase extends CiviSeleniumTestCase { * 'Last Name' => 'mayekar' * ), * ); - * @param int $rowCount count rows (excluding header row). - * @param array $settings used for override settings. + * @param int $rowCount + * Count rows (excluding header row). + * @param array $settings + * Used for override settings. */ public function reviewCSV($file, $checkColumns = array(), $checkRows = array(), $rowCount = 0, $settings = array()) { // Check file exists before proceed. diff --git a/tests/phpunit/WebTest/Import/ImportCiviSeleniumTestCase.php b/tests/phpunit/WebTest/Import/ImportCiviSeleniumTestCase.php index 85c6b67e61..03dd1ad10b 100644 --- a/tests/phpunit/WebTest/Import/ImportCiviSeleniumTestCase.php +++ b/tests/phpunit/WebTest/Import/ImportCiviSeleniumTestCase.php @@ -35,13 +35,20 @@ class ImportCiviSeleniumTestCase extends CiviSeleniumTestCase { /** * Test csv import for each component. * - * @param string $component component name ( Event, Contribution, Membership, Activity etc) - * @param array $headers csv data headers - * @param array $rows csv data rows - * @param string $contactType contact type - * @param string $mode import mode - * @param array $fieldMapper select mapper fields while import - * @param array $other other parameters + * @param string $component + * Component name ( Event, Contribution, Membership, Activity etc). + * @param array $headers + * Csv data headers. + * @param array $rows + * Csv data rows. + * @param string $contactType + * Contact type. + * @param string $mode + * Import mode. + * @param array $fieldMapper + * Select mapper fields while import. + * @param array $other + * Other parameters. * useMappingName : to reuse mapping * dateFormat : date format of data @@ -161,12 +168,18 @@ class ImportCiviSeleniumTestCase extends CiviSeleniumTestCase { /** * Test contact import. * - * @param array $headers csv data headers - * @param array $rows csv data rows - * @param string $contactType contact type - * @param string $mode import mode - * @param array $fieldMapper select mapper fields while import - * @param array $other other parameters + * @param array $headers + * Csv data headers. + * @param array $rows + * Csv data rows. + * @param string $contactType + * Contact type. + * @param string $mode + * Import mode. + * @param array $fieldMapper + * Select mapper fields while import. + * @param array $other + * Other parameters. * contactSubtype : import for selected Contact Subtype * useMappingName : to reuse mapping @@ -182,7 +195,8 @@ class ImportCiviSeleniumTestCase extends CiviSeleniumTestCase { * selectTag : select existing tag for contacts * callbackImportSummary : function to override default import summary assertions * - * @param string $type import type (csv/sql) + * @param string $type + * Import type (csv/sql). * @todo:currently only supports csv, need to work on sql import */ public function importContacts($headers, $rows, $contactType = 'Individual', $mode = 'Skip', $fieldMapper = array(), $other = array(), $type = 'csv') { @@ -417,7 +431,8 @@ class ImportCiviSeleniumTestCase extends CiviSeleniumTestCase { /** * Helper function to get the import url of the component. - * @param string $component component name + * @param string $component + * Component name. * * @return string import url */ diff --git a/tests/phpunit/WebTest/Import/ParticipantTest.php b/tests/phpunit/WebTest/Import/ParticipantTest.php index 4b0d656af6..a06ddbf469 100644 --- a/tests/phpunit/WebTest/Import/ParticipantTest.php +++ b/tests/phpunit/WebTest/Import/ParticipantTest.php @@ -237,7 +237,8 @@ class WebTest_Import_ParticipantTest extends ImportCiviSeleniumTestCase { /** * Helper function to add new event * - * @param array $params parameters to create an event + * @param array $params + * Parameters to create an event. * * @return array $params event details of newly created event */ diff --git a/tests/phpunit/WebTest/Release/ReleaseTestCase.php b/tests/phpunit/WebTest/Release/ReleaseTestCase.php index f531d5ffd7..a2fa2f1273 100644 --- a/tests/phpunit/WebTest/Release/ReleaseTestCase.php +++ b/tests/phpunit/WebTest/Release/ReleaseTestCase.php @@ -45,9 +45,9 @@ class WebTest_Release_ReleaseTestCase extends CiviSeleniumTestCase { * ReflectionClass of the Test class and checks the constructor * of that class to decide how to set up the test. * - * @param string $name - * @param array $data - * @param string $dataName + * @param string $name + * @param array $data + * @param string $dataName * @param array $browser */ function __construct($name = NULL, array$data = array( diff --git a/tests/phpunit/api/v3/APIStandardsTest.php b/tests/phpunit/api/v3/APIStandardsTest.php index a1921740c6..ef2cd3e9c6 100644 --- a/tests/phpunit/api/v3/APIStandardsTest.php +++ b/tests/phpunit/api/v3/APIStandardsTest.php @@ -145,7 +145,8 @@ class api_v3_APIStandardsTest extends CiviUnitTestCase { /** * Require once Files - * @param $files array list of files to load + * @param $files + * Array list of files to load. */ public function requireOnceFilesArray($files) { foreach ($files as $key => $file) { diff --git a/tests/phpunit/api/v3/AttachmentTest.php b/tests/phpunit/api/v3/AttachmentTest.php index c920bd8875..719da086c6 100644 --- a/tests/phpunit/api/v3/AttachmentTest.php +++ b/tests/phpunit/api/v3/AttachmentTest.php @@ -278,7 +278,8 @@ class api_v3_AttachmentTest extends CiviUnitTestCase { /** * Create an attachment using "content" and then "get" the attachment * - * @param string $testEntityClass e.g. "CRM_Core_DAO_Activity" + * @param string $testEntityClass + * E.g. "CRM_Core_DAO_Activity". * @param array $createParams * @param string $expectedContent * @dataProvider okCreateProvider diff --git a/tests/phpunit/api/v3/JobProcessMailingTest.php b/tests/phpunit/api/v3/JobProcessMailingTest.php index 8160ba4926..e3b2244146 100644 --- a/tests/phpunit/api/v3/JobProcessMailingTest.php +++ b/tests/phpunit/api/v3/JobProcessMailingTest.php @@ -96,8 +96,8 @@ class api_v3_JobProcessMailingTest extends CiviUnitTestCase { } /** - * @param integer $count - * @param integer $groupID + * @param int $count + * @param int $groupID */ public function createContactsInGroup($count, $groupID) { for($i = 1; $i <= $count; $i++ ) { @@ -107,8 +107,8 @@ class api_v3_JobProcessMailingTest extends CiviUnitTestCase { } /** - * @param integer $start - * @param integer $count + * @param int $start + * @param int $count * * @return array */ diff --git a/tests/phpunit/api/v3/SyntaxConformanceTest.php b/tests/phpunit/api/v3/SyntaxConformanceTest.php index 146ea193d8..8ce24368e4 100644 --- a/tests/phpunit/api/v3/SyntaxConformanceTest.php +++ b/tests/phpunit/api/v3/SyntaxConformanceTest.php @@ -277,7 +277,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { } /** * Generate list of entities to test for get by id functions - * @param boolean $sequential + * @param bool $sequential * @return array Entities to be skipped */ public static function toBeSkipped_automock($sequential = FALSE) { @@ -774,9 +774,10 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { /** * Check that get fetches an appropriate number of results * - * @param string $entityName Name of entity to test + * @param string $entityName + * Name of entity to test. * @param array $params - * @param integer $limit + * @param int $limit * @param string $message */ public function checkLimitAgainstExpected($entityName, $params, $limit, $message) { diff --git a/tests/phpunit/api/v3/UtilsTest.php b/tests/phpunit/api/v3/UtilsTest.php index ee92543d18..beb4f01635 100644 --- a/tests/phpunit/api/v3/UtilsTest.php +++ b/tests/phpunit/api/v3/UtilsTest.php @@ -102,7 +102,8 @@ class api_v3_UtilsTest extends CiviUnitTestCase { * @param string $entity * @param string $action * @param array $params - * @param bool $throws whether we should pass any exceptions for authorization failures + * @param bool $throws + * Whether we should pass any exceptions for authorization failures. * * @throws API_Exception * @throws Exception