projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #17042 from civicrm/5.25
[civicrm-core.git]
/
tests
/
phpunit
/
CRM
/
Core
/
BAO
/
IMTest.php
diff --git
a/tests/phpunit/CRM/Core/BAO/IMTest.php
b/tests/phpunit/CRM/Core/BAO/IMTest.php
index c1420a9e9f7be3bc93aefe2e665318ae40bee8c1..cc82bd0eb02f151a36e5a74ecfba18726305f43c 100644
(file)
--- a/
tests/phpunit/CRM/Core/BAO/IMTest.php
+++ b/
tests/phpunit/CRM/Core/BAO/IMTest.php
@@
-5,6
+5,7
@@
* @group headless
*/
class CRM_Core_BAO_IMTest extends CiviUnitTestCase {
* @group headless
*/
class CRM_Core_BAO_IMTest extends CiviUnitTestCase {
+
public function setUp() {
parent::setUp();
}
public function setUp() {
parent::setUp();
}
@@
-15,14
+16,14
@@
class CRM_Core_BAO_IMTest extends CiviUnitTestCase {
public function testAdd() {
$contactId = $this->individualCreate();
public function testAdd() {
$contactId = $this->individualCreate();
- $params =
array()
;
- $params =
array(
+ $params =
[]
;
+ $params =
[
'name' => 'jane.doe',
'provider_id' => 1,
'is_primary' => 1,
'location_type_id' => 1,
'contact_id' => $contactId,
'name' => 'jane.doe',
'provider_id' => 1,
'is_primary' => 1,
'location_type_id' => 1,
'contact_id' => $contactId,
-
)
;
+
]
;
CRM_Core_BAO_IM::add($params);
CRM_Core_BAO_IM::add($params);
@@
-32,13
+33,13
@@
class CRM_Core_BAO_IMTest extends CiviUnitTestCase {
// Now call add() to modify an existing IM
// Now call add() to modify an existing IM
- $params =
array()
;
- $params =
array(
+ $params =
[]
;
+ $params =
[
'id' => $imId,
'contact_id' => $contactId,
'provider_id' => 3,
'name' => 'doe.jane',
'id' => $imId,
'contact_id' => $contactId,
'provider_id' => 3,
'name' => 'doe.jane',
-
)
;
+
]
;
CRM_Core_BAO_IM::add($params);
CRM_Core_BAO_IM::add($params);
@@
-54,11
+55,7
@@
class CRM_Core_BAO_IMTest extends CiviUnitTestCase {
* AllIMs() method - get all IMs for our contact, with primary IM first
*/
public function testAllIMs() {
* AllIMs() method - get all IMs for our contact, with primary IM first
*/
public function testAllIMs() {
- $op = new PHPUnit_Extensions_Database_Operation_Insert();
- $op->execute(
- $this->_dbconn,
- $this->createFlatXMLDataSet(dirname(__FILE__) . '/dataset/im_test.xml')
- );
+ $this->loadXMLDataSet(dirname(__FILE__) . '/dataset/im_test.xml');
$contactId = 69;
$IMs = CRM_Core_BAO_IM::allIMs($contactId);
$contactId = 69;
$IMs = CRM_Core_BAO_IM::allIMs($contactId);