File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
dev/tests/api-functional/testsuite/Magento/Downloadable/Api Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,17 @@ class SampleRepositoryTest extends WebapiAbstract
36
36
*/
37
37
protected $ deleteServiceInfo ;
38
38
39
+ /**
40
+ * @var DomainManagerInterface
41
+ */
42
+ private $ domainManager ;
43
+
39
44
protected function setUp (): void
40
45
{
46
+ $ objectManager = Bootstrap::getObjectManager ();
47
+ $ this ->domainManager = $ objectManager ->get (DomainManagerInterface::class);
48
+ $ this ->domainManager ->addDomains (['example.com ' ]);
49
+
41
50
$ this ->createServiceInfo = [
42
51
'rest ' => [
43
52
'resourcePath ' => '/V1/products/downloadable-product/downloadable-links/samples ' ,
@@ -75,6 +84,15 @@ protected function setUp(): void
75
84
$ this ->testImagePath = __DIR__ . str_replace ('/ ' , DIRECTORY_SEPARATOR , '/_files/test_image.jpg ' );
76
85
}
77
86
87
+ /**
88
+ * Remove example domain from whitelist and call parent restore configuration
89
+ */
90
+ protected function tearDown (): void
91
+ {
92
+ parent ::tearDown ();
93
+ $ this ->domainManager ->removeDomains (['example.com ' ]);
94
+ }
95
+
78
96
/**
79
97
* Retrieve product that was updated by test
80
98
*
You can’t perform that action at this time.
0 commit comments