Skip to content

Commit

Permalink
Merge pull request #25540 from eileenmcnaughton/world
Browse files Browse the repository at this point in the history
Remove invalid  'world_region' => 'India' from test
  • Loading branch information
eileenmcnaughton authored Feb 9, 2023
2 parents 81a0084 + d338787 commit 82a628f
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions tests/phpunit/CRM/Contact/BAO/ContactTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public function testAddWithAllContactTypes(): void {
*
* Test with missing params.
*/
public function testCreateWithEmptyParams() {
public function testCreateWithEmptyParams(): void {
$params = [
'first_name' => 'Bill',
'last_name' => 'Adams',
Expand All @@ -246,7 +246,7 @@ public function testCreateWithEmptyParams() {
* Test with all params.
* ( create and update modes ).
*/
public function testCreateWithAll() {
public function testCreateWithAll(): void {
//take the common contact params
$params = $this->contactParams();
$params['note'] = 'test note';
Expand Down Expand Up @@ -703,7 +703,6 @@ public function testCreateProfileContact(): void {
'supplemental_address_3-Primary' => 'My Town',
'user_unique_id' => '123456789',
'is_bulkmail' => '1',
'world_region' => 'India',
'tag' => [
'3' => '1',
'4' => '1',
Expand Down Expand Up @@ -901,7 +900,6 @@ public function testCreateProfileContact(): void {
'supplemental_address_3-Primary' => 'Anywhere',
'user_unique_id' => '1122334455',
'is_bulkmail' => '1',
'world_region' => 'India',
'tag' => [
'2' => '1',
'5' => '1',
Expand Down Expand Up @@ -1103,7 +1101,7 @@ public function testFields() {
/**
* Test case for getPrimaryEmail.
*/
public function testGetPrimaryEmail() {
public function testGetPrimaryEmail(): void {
//get the contact params
$params = $this->contactParams();
$params['email'][2] = $params['email'][1];
Expand Down Expand Up @@ -1722,7 +1720,7 @@ public function longUnicodeOrgNames():array {
/**
* Show age of contact on Deceased date
*/
public function testAgeOfDeceasedContact() {
public function testAgeOfDeceasedContact(): void {
$birthDate = '1961-06-06';
$deceasedDate = '1991-07-07';
$age = CRM_Utils_Date::calculateAge($birthDate, $deceasedDate);
Expand All @@ -1732,7 +1730,7 @@ public function testAgeOfDeceasedContact() {
/**
* Show age of Contact with current date
*/
public function testAgeOfNormalContact() {
public function testAgeOfNormalContact(): void {
$birthDate = '1961-06-06';
$age = CRM_Utils_Date::calculateAge($birthDate);
$this->assertGreaterThanOrEqual('59', $age['years']);
Expand All @@ -1741,7 +1739,7 @@ public function testAgeOfNormalContact() {
/**
* Test invalidateChecksum hook.
*/
public function testInvalidateChecksumHook() {
public function testInvalidateChecksumHook(): void {
$contact_id = $this->individualCreate();
$checksum = CRM_Contact_BAO_Contact_Utils::generateChecksum($contact_id);
// without the hook it's valid
Expand All @@ -1758,7 +1756,7 @@ public function testInvalidateChecksumHook() {
* @param string $inputCheck
* @param bool $invalid
*/
public function hookForInvalidateChecksum(int $contactID, string $inputCheck, bool &$invalid) {
public function hookForInvalidateChecksum(int $contactID, string $inputCheck, bool &$invalid): void {
// invalidate all checksums
$invalid = TRUE;
}
Expand Down

0 comments on commit 82a628f

Please sign in to comment.