From fce27eeb0ba3be34c77bf750708936d54be13091 Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 29 Jul 2019 02:59:12 +1200 Subject: [PATCH] Convert test --- tests/phpunit/CRM/Export/BAO/ExportTest.php | 24 +++++---------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/tests/phpunit/CRM/Export/BAO/ExportTest.php b/tests/phpunit/CRM/Export/BAO/ExportTest.php index 36e76e5911..1716076139 100644 --- a/tests/phpunit/CRM/Export/BAO/ExportTest.php +++ b/tests/phpunit/CRM/Export/BAO/ExportTest.php @@ -1765,6 +1765,8 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase { * @param array $expectedHeaders * * @throws \CRM_Core_Exception + * @throws \League\Csv\Exception + * * @dataProvider getSqlColumnsOutput */ public function testGetSQLColumnsAndHeaders($exportMode, $expected, $expectedHeaders) { @@ -1774,25 +1776,9 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase { // eventually aspire to call $provider->getSQLColumns straight after it // is intiated. $this->setupBaseExportData($exportMode); - - $result = CRM_Export_BAO_Export::exportComponents( - TRUE, - [1], - [], - NULL, - NULL, - NULL, - $exportMode, - NULL, - NULL, - FALSE, - FALSE, - [ - 'suppress_csv_for_testing' => TRUE, - ] - ); - $this->assertEquals($expected, $result[1]); - $this->assertEquals($expectedHeaders, $result[2]); + $this->doExportTest(['selectAll' => TRUE, 'exportMode' => $exportMode, 'ids' => [1]]); + $this->assertEquals($expected, $this->processor->getSQLColumns()); + $this->assertEquals($expectedHeaders, $this->processor->getHeaderRows()); } /** -- 2.25.1