Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-integration
Test
Unit
Helper
DataTest.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Integration\Test\Unit\Helper
;
7
8
use
Magento\Integration\Model\Integration
;
9
10
class
DataTest
extends
\PHPUnit\Framework\TestCase
11
{
13
protected
$dataHelper
;
14
15
protected
function
setUp
()
16
{
17
$helper
= new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
18
$this->dataHelper =
$helper
->getObject(\
Magento
\
Integration
\Helper\Data::class);
19
}
20
21
public
function
testMapResources
()
22
{
23
$testData = require
__DIR__
.
'/_files/acl.php'
;
24
$expectedData = require
__DIR__
.
'/_files/acl-map.php'
;
25
$this->assertEquals($expectedData, $this->dataHelper->mapResources($testData));
26
}
27
31
public
function
testIsConfigType
($integrationsData, $expectedResult)
32
{
33
$this->assertEquals($expectedResult, $this->dataHelper->isConfigType($integrationsData));
34
}
35
39
public
function
integrationDataProvider
()
40
{
41
return
[
42
[
43
[
44
'id'
=> 1,
45
Integration::NAME
=>
'TestIntegration1'
,
46
Integration::EMAIL
=>
'
[email protected]
'
,
47
Integration::ENDPOINT
=>
'http://endpoint.com'
,
48
Integration::SETUP_TYPE
=> 1,
49
],
50
true
,
51
],
52
[
53
[
54
'id'
=> 1,
55
Integration::NAME
=>
'TestIntegration1'
,
56
Integration::EMAIL
=>
'
[email protected]
'
,
57
Integration::ENDPOINT
=>
'http://endpoint.com'
,
58
Integration::SETUP_TYPE
=> 0,
59
],
60
false
,
61
]
62
];
63
}
64
}
$helper
$helper
Definition:
iframe.phtml:13
Magento\Integration\Test\Unit\Helper\DataTest\$dataHelper
$dataHelper
Definition:
DataTest.php:13
Magento\Integration\Test\Unit\Helper\DataTest
Definition:
DataTest.php:10
__DIR__
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition:
_bootstrap.php:60
Magento\Integration\Model\Integration
Magento\Integration\Model\Integration\ENDPOINT
const ENDPOINT
Definition:
Integration.php:62
Magento\Integration\Test\Unit\Helper\DataTest\setUp
setUp()
Definition:
DataTest.php:15
Magento\Integration\Test\Unit\Helper\DataTest\testIsConfigType
testIsConfigType($integrationsData, $expectedResult)
Definition:
DataTest.php:31
Magento\Integration\Model\Integration\EMAIL
const EMAIL
Definition:
Integration.php:60
Magento\Integration\Test\Unit\Helper\DataTest\integrationDataProvider
integrationDataProvider()
Definition:
DataTest.php:39
Magento
Magento\Integration\Test\Unit\Helper\DataTest\testMapResources
testMapResources()
Definition:
DataTest.php:21
Magento\Integration\Model\Integration
Definition:
Integration.php:31
Magento\Integration\Model\Integration\SETUP_TYPE
const SETUP_TYPE
Definition:
Integration.php:66
Magento\Integration\Model\Integration\NAME
const NAME
Definition:
Integration.php:58
Magento\Integration\Test\Unit\Helper
Definition:
DataTest.php:6