dataHelper = $helper->getObject(\Magento\Integration\Helper\Data::class); } public function testMapResources() { $testData = require __DIR__ . '/_files/acl.php'; $expectedData = require __DIR__ . '/_files/acl-map.php'; $this->assertEquals($expectedData, $this->dataHelper->mapResources($testData)); } /** * @dataProvider integrationDataProvider */ public function testIsConfigType($integrationsData, $expectedResult) { $this->assertEquals($expectedResult, $this->dataHelper->isConfigType($integrationsData)); } /** * @return array */ public function integrationDataProvider() { return [ [ [ 'id' => 1, Integration::NAME => 'TestIntegration1', Integration::EMAIL => 'test-integration1@magento.com', Integration::ENDPOINT => 'http://endpoint.com', Integration::SETUP_TYPE => 1, ], true, ], [ [ 'id' => 1, Integration::NAME => 'TestIntegration1', Integration::EMAIL => 'test-integration1@magento.com', Integration::ENDPOINT => 'http://endpoint.com', Integration::SETUP_TYPE => 0, ], false, ] ]; } }