From 21e9f92a894be9d8de6b098b7bef077390d11eb6 Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 20 May 2019 16:46:07 +1200 Subject: [PATCH] Clean up groupNesting Test to not use dbunit --- tests/phpunit/api/v3/MailingContactTest.php | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/tests/phpunit/api/v3/MailingContactTest.php b/tests/phpunit/api/v3/MailingContactTest.php index a9e00c9ea3..58613a063f 100644 --- a/tests/phpunit/api/v3/MailingContactTest.php +++ b/tests/phpunit/api/v3/MailingContactTest.php @@ -134,24 +134,12 @@ class api_v3_MailingContactTest extends CiviUnitTestCase { * Test that the API returns a mailing properly when there is only one. */ public function testMailingContactDelivered() { - $op = new PHPUnit_Extensions_Database_Operation_Insert(); - //Create the User - $op->execute($this->_dbconn, - $this->createXMLDataSet( - dirname(__FILE__) . '/dataset/mailing_contact.xml' - ) - ); - // Create the Mailing and connections to the user. - $op->execute($this->_dbconn, - $this->createXMLDataSet( - dirname(__FILE__) . '/dataset/mailing_delivered.xml' - ) - ); + $contactID = $this->individualCreate(['first_name' => 'Test']); - $params = array( - 'contact_id' => 23, + $params = [ + 'contact_id' => $contactID, 'type' => 'Delivered', - ); + ]; $result = $this->callAPISuccess('MailingContact', 'get', $params); $count = $this->callAPISuccess('MailingContact', 'getcount', $params); -- 2.25.1