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
magento2-base
dev
tests
functional
tests
app
Magento
Swagger
Test
TestCase
SwaggerUiForRestApiTest.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Swagger\Test\TestCase
;
8
9
use Magento\Mtf\TestCase\Injectable;
10
use
Magento\Swagger\Test\Page\SwaggerUiPage
;
11
27
class
SwaggerUiForRestApiTest
extends
Injectable
28
{
29
/* tags */
30
const
MVP
=
'no'
;
31
const
TEST_TYPE
=
'extended_acceptance_test'
;
32
/* end tags */
33
39
protected
$serviceName
;
40
46
protected
$endpoints
;
47
53
protected
$swaggerPage
;
54
61
public
function
__inject
(
62
SwaggerUiPage
$swaggerPage
63
) {
64
$this->swaggerPage =
$swaggerPage
;
65
}
66
74
public
function
test
(
75
$serviceName
,
76
array
$endpoints
77
) {
78
$this->serviceName =
$serviceName
;
79
$this->endpoints =
$endpoints
;
80
$this->swaggerPage->open();
81
$this->swaggerPage->expandServiceContent($this->serviceName);
82
foreach
(
$endpoints
as $endpoint) {
83
$this->swaggerPage->expandEndpointContent(
$serviceName
, $endpoint);
84
}
85
}
86
92
public
function
tearDown
()
93
{
94
foreach
($this->endpoints as $endpoint) {
95
$this->swaggerPage->closeEndpointContent($this->serviceName, $endpoint);
96
}
97
$this->swaggerPage->closeServiceContent($this->serviceName);
98
$this->swaggerPage->close();
99
}
100
}
Magento\Swagger\Test\TestCase\SwaggerUiForRestApiTest\tearDown
tearDown()
Definition:
SwaggerUiForRestApiTest.php:92
Magento\Swagger\Test\TestCase\SwaggerUiForRestApiTest\__inject
__inject(SwaggerUiPage $swaggerPage)
Definition:
SwaggerUiForRestApiTest.php:61
Magento\Swagger\Test\TestCase\SwaggerUiForRestApiTest\test
test( $serviceName, array $endpoints)
Definition:
SwaggerUiForRestApiTest.php:74
Magento\Swagger\Test\TestCase\SwaggerUiForRestApiTest\$swaggerPage
$swaggerPage
Definition:
SwaggerUiForRestApiTest.php:53
Magento\Swagger\Test\TestCase\SwaggerUiForRestApiTest
Definition:
SwaggerUiForRestApiTest.php:27
Magento\Swagger\Test\TestCase\SwaggerUiForRestApiTest\$endpoints
$endpoints
Definition:
SwaggerUiForRestApiTest.php:46
Magento\Swagger\Test\TestCase\SwaggerUiForRestApiTest\TEST_TYPE
const TEST_TYPE
Definition:
SwaggerUiForRestApiTest.php:31
Magento\Swagger\Test\Page\SwaggerUiPage
Definition:
SwaggerUiPage.php:15
Magento\Swagger\Test\TestCase\SwaggerUiForRestApiTest\MVP
const MVP
Definition:
SwaggerUiForRestApiTest.php:30
Magento\Swagger\Test\TestCase\SwaggerUiForRestApiTest\$serviceName
$serviceName
Definition:
SwaggerUiForRestApiTest.php:39
Magento\Swagger\Test\TestCase
Definition:
SwaggerUiForRestApiTest.php:7