From: Eileen McNaughton Date: Tue, 3 Feb 2015 00:59:39 +0000 (+1300) Subject: more comment fixes X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=11e974ee8ee631d84034da9218d21b2413675f20;p=civicrm-core.git more comment fixes --- diff --git a/tests/phpunit/api/v3/ActionScheduleTest.php b/tests/phpunit/api/v3/ActionScheduleTest.php index e403dd2deb..7fca8f8abb 100644 --- a/tests/phpunit/api/v3/ActionScheduleTest.php +++ b/tests/phpunit/api/v3/ActionScheduleTest.php @@ -1,6 +1,7 @@ useTransaction(TRUE); } + /** + * Test simple create action schedule. + */ public function testSimpleActionScheduleCreate() { $oldCount = CRM_Core_DAO::singleValueQuery('select count(*) from civicrm_action_schedule'); $activityContacts = CRM_Core_OptionGroup::values('activity_contacts', FALSE, FALSE, FALSE, NULL, 'name'); $assigneeID = CRM_Utils_Array::key('Activity Assignees', $activityContacts); - $targetID = CRM_Utils_Array::key('Activity Targets', $activityContacts); $scheduledStatus = CRM_Core_OptionGroup::getValue('activity_status', 'Scheduled', 'name'); $mappingId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_ActionMapping', 'activity_type', 'id', 'entity_value'); $activityTypeId = CRM_Core_OptionGroup::getValue('activity_type', "Meeting", 'name'); @@ -71,14 +69,14 @@ class api_v3_ActionScheduleTest extends CiviUnitTestCase { 'mapping_id' => $mappingId, ); $actionSchedule = $this->callAPISuccess('action_schedule', 'create', $params); - $this->assertTrue(is_numeric($actionSchedule['id']), "In line " . __LINE__); - $this->assertTrue($actionSchedule['id'] > 0, "In line " . __LINE__); + $this->assertTrue(is_numeric($actionSchedule['id'])); + $this->assertTrue($actionSchedule['id'] > 0); $newCount = CRM_Core_DAO::singleValueQuery('select count(*) from civicrm_action_schedule'); $this->assertEquals($oldCount + 1, $newCount); } /** - * Check if required fields are not passed + * Check if required fields are not passed. */ public function testActionScheduleCreateWithoutRequired() { $params = array( @@ -89,7 +87,7 @@ class api_v3_ActionScheduleTest extends CiviUnitTestCase { } /** - * + * Test create with scheduled dates. */ public function testActionScheduleWithScheduledDatesCreate() { $oldCount = CRM_Core_DAO::singleValueQuery('select count(*) from civicrm_action_schedule'); @@ -123,8 +121,8 @@ class api_v3_ActionScheduleTest extends CiviUnitTestCase { 'subject' => 'Test subject', ); $actionSchedule = $this->callAPISuccess('action_schedule', 'create', $params); - $this->assertTrue(is_numeric($actionSchedule['id']), "In line " . __LINE__); - $this->assertTrue($actionSchedule['id'] > 0, "In line " . __LINE__); + $this->assertTrue(is_numeric($actionSchedule['id'])); + $this->assertTrue($actionSchedule['id'] > 0); $this->assertEquals($actionSchedule['values'][$actionSchedule['id']]['start_action_offset'][0], $params['start_action_offset']); $newCount = CRM_Core_DAO::singleValueQuery('select count(*) from civicrm_action_schedule'); $this->assertEquals($oldCount + 1, $newCount); diff --git a/tests/phpunit/api/v3/LocBlockTest.php b/tests/phpunit/api/v3/LocBlockTest.php index 3d83a910a1..baf8446be5 100644 --- a/tests/phpunit/api/v3/LocBlockTest.php +++ b/tests/phpunit/api/v3/LocBlockTest.php @@ -34,6 +34,9 @@ class api_v3_LocBlockTest extends CiviUnitTestCase { protected $_apiversion = 3; protected $_entity = 'loc_block'; + /** + * Set up. + */ public function setUp() { parent::setUp(); $this->useTransaction(TRUE); @@ -113,7 +116,7 @@ class api_v3_LocBlockTest extends CiviUnitTestCase { $this->assertEquals($params['phone_2']['phone'], $result['phone_2']['phone']); $this->assertEquals($params['address']['street_address'], $result['address']['street_address']); - $this->callAPISuccess($this->_entity, 'delete', array('id' => $id)); + $this->callAPISuccess($this->_entity, 'delete', array('id' => $id)); } }