From e4d5f1e21353b5624568fc7ba1479dd9ee3bc622 Mon Sep 17 00:00:00 2001 From: eileen Date: Sun, 4 Aug 2013 15:42:30 +1200 Subject: [PATCH] test fixup- changed fn signature doesn't expect 'NULL' --- tests/phpunit/CiviTest/CiviUnitTestCase.php | 2 +- tests/phpunit/api/v3/EntityTagTest.php | 2 +- tests/phpunit/api/v3/EventTest.php | 2 +- tests/phpunit/api/v3/GroupContactTest.php | 2 +- tests/phpunit/api/v3/MembershipPaymentTest.php | 4 ++-- tests/phpunit/api/v3/MembershipTest.php | 3 +-- tests/phpunit/api/v3/ParticipantPaymentTest.php | 8 ++++---- tests/phpunit/api/v3/ParticipantTest.php | 6 +++--- tests/phpunit/api/v3/PledgePaymentTest.php | 2 +- tests/phpunit/api/v3/PledgeTest.php | 2 +- tests/phpunit/api/v3/RelationshipTest.php | 2 +- tests/phpunit/api/v3/RelationshipTypeTest.php | 4 ++-- 12 files changed, 19 insertions(+), 20 deletions(-) diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index e2d4b8efbb..4728c92c07 100644 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -1568,7 +1568,7 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { function activityCreate($params = NULL) { if ($params === NULL) { - $individualSourceID = $this->individualCreate(NULL); + $individualSourceID = $this->individualCreate(); $contactParams = array( 'first_name' => 'Julia', diff --git a/tests/phpunit/api/v3/EntityTagTest.php b/tests/phpunit/api/v3/EntityTagTest.php index a559cac704..1e8d261057 100644 --- a/tests/phpunit/api/v3/EntityTagTest.php +++ b/tests/phpunit/api/v3/EntityTagTest.php @@ -49,7 +49,7 @@ class api_v3_EntityTagTest extends CiviUnitTestCase { function setUp() { parent::setUp(); - $this->_individualID = $this->individualCreate(NULL); + $this->_individualID = $this->individualCreate(); $this->_tag = $this->tagCreate(); $this->_tagID = $this->_tag['id']; $this->_householdID = $this->houseHoldCreate(NULL); diff --git a/tests/phpunit/api/v3/EventTest.php b/tests/phpunit/api/v3/EventTest.php index 4e72d23243..1320ad7e81 100644 --- a/tests/phpunit/api/v3/EventTest.php +++ b/tests/phpunit/api/v3/EventTest.php @@ -384,7 +384,7 @@ class api_v3_EventTest extends CiviUnitTestCase { * Trying to delete an event with participants should return error */ function testDeleteWithExistingParticipant() { - $contactID = $this->individualCreate(NULL); + $contactID = $this->individualCreate(); $participantID = $this->participantCreate( array( 'contactID' => $contactID, diff --git a/tests/phpunit/api/v3/GroupContactTest.php b/tests/phpunit/api/v3/GroupContactTest.php index 555c6278b3..2fad996fb1 100644 --- a/tests/phpunit/api/v3/GroupContactTest.php +++ b/tests/phpunit/api/v3/GroupContactTest.php @@ -52,7 +52,7 @@ class api_v3_GroupContactTest extends CiviUnitTestCase { function setUp() { parent::setUp(); - $this->_contactId = $this->individualCreate(NULL); + $this->_contactId = $this->individualCreate(); $this->_groupId1 = $this->groupCreate(NULL); $params = array( diff --git a/tests/phpunit/api/v3/MembershipPaymentTest.php b/tests/phpunit/api/v3/MembershipPaymentTest.php index 9bde832bad..b10b85caa5 100644 --- a/tests/phpunit/api/v3/MembershipPaymentTest.php +++ b/tests/phpunit/api/v3/MembershipPaymentTest.php @@ -95,7 +95,7 @@ class api_v3_MembershipPaymentTest extends CiviUnitTestCase { * Test civicrm_membership_payment_create - success expected. */ public function testCreate() { - $contactId = $this->individualCreate(NULL); + $contactId = $this->individualCreate(); $params = array( 'contact_id' => $contactId, @@ -135,7 +135,7 @@ class api_v3_MembershipPaymentTest extends CiviUnitTestCase { * Test civicrm_membershipPayment_get - success expected. */ public function testGet() { - $contactId = $this->individualCreate(NULL); + $contactId = $this->individualCreate(); $params = array( 'contact_id' => $contactId, 'membership_type_id' => $this->_membershipTypeID, diff --git a/tests/phpunit/api/v3/MembershipTest.php b/tests/phpunit/api/v3/MembershipTest.php index 2445872b9e..8595db88b0 100644 --- a/tests/phpunit/api/v3/MembershipTest.php +++ b/tests/phpunit/api/v3/MembershipTest.php @@ -53,7 +53,6 @@ class api_v3_MembershipTest extends CiviUnitTestCase { $this->_membershipTypeID = $this->membershipTypeCreate(array('member_of_contact_id' => $this->_contactID)); $this->_membershipStatusID = $this->membershipStatusCreate('test status'); - require_once 'CRM/Member/PseudoConstant.php'; CRM_Member_PseudoConstant::membershipType(NULL, TRUE); CRM_Member_PseudoConstant::membershipStatus(NULL, NULL, 'name', TRUE); CRM_Core_PseudoConstant::activityType(TRUE, TRUE, TRUE, 'name'); @@ -307,7 +306,7 @@ class api_v3_MembershipTest extends CiviUnitTestCase { */ function testGetWithRelationship() { $membershipOrgId = $this->organizationCreate(NULL); - $memberContactId = $this->individualCreate(NULL); + $memberContactId = $this->individualCreate(); $relTypeParams = array( 'name_a_b' => 'Relation 1', diff --git a/tests/phpunit/api/v3/ParticipantPaymentTest.php b/tests/phpunit/api/v3/ParticipantPaymentTest.php index 8b853b29ab..f0506cad2c 100644 --- a/tests/phpunit/api/v3/ParticipantPaymentTest.php +++ b/tests/phpunit/api/v3/ParticipantPaymentTest.php @@ -63,16 +63,16 @@ class api_v3_ParticipantPaymentTest extends CiviUnitTestCase { $this->quickCleanup($tablesToTruncate); $event = $this->eventCreate(NULL); $this->_eventID = $event['id']; - $this->_contactID = $this->individualCreate(NULL); + $this->_contactID = $this->individualCreate(); $this->_createdParticipants = array(); - $this->_individualId = $this->individualCreate(NULL); + $this->_individualId = $this->individualCreate(); $this->_participantID = $this->participantCreate(array('contactID' => $this->_contactID, 'eventID' => $this->_eventID)); - $this->_contactID2 = $this->individualCreate(NULL); + $this->_contactID2 = $this->individualCreate(); $this->_participantID2 = $this->participantCreate(array('contactID' => $this->_contactID2, 'eventID' => $this->_eventID)); $this->_participantID3 = $this->participantCreate(array('contactID' => $this->_contactID2, 'eventID' => $this->_eventID)); - $this->_contactID3 = $this->individualCreate(NULL); + $this->_contactID3 = $this->individualCreate(); $this->_participantID4 = $this->participantCreate(array('contactID' => $this->_contactID3, 'eventID' => $this->_eventID)); } diff --git a/tests/phpunit/api/v3/ParticipantTest.php b/tests/phpunit/api/v3/ParticipantTest.php index 007aff789f..c88ccb7b2c 100644 --- a/tests/phpunit/api/v3/ParticipantTest.php +++ b/tests/phpunit/api/v3/ParticipantTest.php @@ -62,13 +62,13 @@ class api_v3_ParticipantTest extends CiviUnitTestCase { $event = $this->eventCreate(NULL); $this->_eventID = $event['id']; - $this->_contactID = $this->individualCreate(NULL); + $this->_contactID = $this->individualCreate(); $this->_createdParticipants = array(); - $this->_individualId = $this->individualCreate(NULL); + $this->_individualId = $this->individualCreate(); $this->_participantID = $this->participantCreate(array('contact_id' => $this->_contactID, 'event_id' => $this->_eventID)); - $this->_contactID2 = $this->individualCreate(NULL); + $this->_contactID2 = $this->individualCreate(); $this->_participantID2 = $this->participantCreate(array('contact_id' => $this->_contactID2, 'event_id' => $this->_eventID)); $this->_participantID3 = $this->participantCreate(array('contact_id' => $this->_contactID2, 'event_id' => $this->_eventID)); $this->_params = array( diff --git a/tests/phpunit/api/v3/PledgePaymentTest.php b/tests/phpunit/api/v3/PledgePaymentTest.php index 80e2f5a6f8..88d7d07774 100644 --- a/tests/phpunit/api/v3/PledgePaymentTest.php +++ b/tests/phpunit/api/v3/PledgePaymentTest.php @@ -49,7 +49,7 @@ class api_v3_PledgePaymentTest extends CiviUnitTestCase { function setUp() { parent::setUp(); - $this->_individualId = $this->individualCreate(NULL); + $this->_individualId = $this->individualCreate(); $this->_pledgeID = $this->pledgeCreate($this->_individualId); $this->_contributionID = $this->contributionCreate($this->_individualId); } diff --git a/tests/phpunit/api/v3/PledgeTest.php b/tests/phpunit/api/v3/PledgeTest.php index b7c5fbead2..26c3a4ae46 100644 --- a/tests/phpunit/api/v3/PledgeTest.php +++ b/tests/phpunit/api/v3/PledgeTest.php @@ -54,7 +54,7 @@ class api_v3_PledgeTest extends CiviUnitTestCase { //due to timezone issues $this->scheduled_date = date('Ymd', mktime(0, 0, 0, date("m"), date("d") + 2, date("y"))); $this->_entity = 'Pledge'; - $this->_individualId = $this->individualCreate(NULL); + $this->_individualId = $this->individualCreate(); $this->_params = array( 'contact_id' => $this->_individualId, 'pledge_create_date' => date('Ymd'), diff --git a/tests/phpunit/api/v3/RelationshipTest.php b/tests/phpunit/api/v3/RelationshipTest.php index c2c864b6ad..08b98608dd 100644 --- a/tests/phpunit/api/v3/RelationshipTest.php +++ b/tests/phpunit/api/v3/RelationshipTest.php @@ -53,7 +53,7 @@ class api_v3_RelationshipTest extends CiviUnitTestCase { function setUp() { parent::setUp(); - $this->_cId_a = $this->individualCreate(NULL); + $this->_cId_a = $this->individualCreate(); $this->_cId_b = $this->organizationCreate(); $this->_cId_b2 = $this->organizationCreate(array('organization_name' => ' Org 2')); $this->_entity = 'relationship'; diff --git a/tests/phpunit/api/v3/RelationshipTypeTest.php b/tests/phpunit/api/v3/RelationshipTypeTest.php index a0c315e0a6..dd16c09b19 100644 --- a/tests/phpunit/api/v3/RelationshipTypeTest.php +++ b/tests/phpunit/api/v3/RelationshipTypeTest.php @@ -75,8 +75,8 @@ class api_v3_RelationshipTypeTest extends CiviUnitTestCase { function setUp() { parent::setUp(); - $this->_cId_a = $this->individualCreate(NULL); - $this->_cId_b = $this->organizationCreate(NULL); + $this->_cId_a = $this->individualCreate(); + $this->_cId_b = $this->organizationCreate(); } function tearDown() { -- 2.25.1