Merge pull request #2862 from pratik-joshi/CRM-13973-comment
[civicrm-core.git] / tests / phpunit / WebTest / Import / ActivityTest.php
index 48ca8121e379598e390e45d3f17cad9459ec773a..f92039a7709637476ccc1f6dbca54dc08f2267a7 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 */
 
-
 require_once 'WebTest/Import/ImportCiviSeleniumTestCase.php';
 class WebTest_Import_ActivityTest extends ImportCiviSeleniumTestCase {
 
@@ -52,14 +51,12 @@ class WebTest_Import_ActivityTest extends ImportCiviSeleniumTestCase {
     $firstName1 = substr(sha1(rand()), 0, 7);
     $email1 = 'mail_' . substr(sha1(rand()), 0, 7) . '@example.com';
     $this->webtestAddContact($firstName1, 'Anderson', $email1);
-    $url = explode('&cid=', $this->getLocation());
-    $id1 = $url[1];
+    $id1 = $this->urlArg('cid');
 
     $firstName2 = substr(sha1(rand()), 0, 7);
     $email2 = 'mail_' . substr(sha1(rand()), 0, 7) . '@example.com';
     $this->webtestAddContact($firstName2, 'Anderson', $email2);
-    $url = explode('&cid=', $this->getLocation());
-    $id2 = $url[1];
+    $id2 = $this->urlArg('cid');
 
     $headers = array(
       'target_contact_id' => 'Contact ID',