9 use Magento\Integration\Test\Fixture\Integration;
10 use Magento\Mtf\Config\DataInterface;
11 use Magento\Mtf\Fixture\FixtureFactory;
12 use Magento\Mtf\ObjectManager;
13 use Magento\Mtf\Util\Protocol\CurlInterface;
62 'Accept: application/json',
63 'Content-Type:application/json',
99 protected function init()
101 $integrationToken = $this->configuration->get(self::CONFIG_TOKEN_PATH);
107 \
Magento\Integration\Test\Fixture\Integration::class,
108 [
'dataset' =>
'default_active']
123 $config = $this->fixtureFactory->create(
124 \
Magento\Config\Test\Fixture\ConfigData::class,
125 [
'dataset' =>
'secret_key_disable']
138 $fileConfig =
MTF_BP .
'/etc/config.xml';
139 $dom = new \DOMDocument();
140 if (!file_exists($fileConfig)) {
141 copy(
MTF_BP .
'/etc/config.xml.dist', $fileConfig);
143 $dom->load($fileConfig);
145 $webapiToken = (new \DOMXPath($dom))->query(
'//config/handler/webapi/token')->item(0);
149 $webapi = (new \DOMXPath($dom))->query(
'//config/handler/webapi')->item(0);
150 $webapi->appendChild($dom->createElement(
'token',
$integration->getToken()));
153 $dom->save($fileConfig);
154 $this->configuration = $this->objectManager->create(\
Magento\
Mtf\Config\DataInterface::class);
164 $this->
write($_ENV[
'app_frontend_url'] .
'rest/V1/modules', [], CurlInterface::GET);
182 [
'Authorization: Bearer ' . $this->configuration->get(self::CONFIG_TOKEN_PATH)],
197 $this->response = $this->transport->read();
220 $this->transport->close();
defined('MTF_TESTS_PATH')||define('MTF_TESTS_PATH' MTF_BP
__construct(ObjectManager $objectManager, CurlTransport $transport, DataInterface $configuration, FixtureFactory $fixtureFactory)
write($url, $params=[], $method=CurlInterface::POST, $headers=[])
setConfiguration(Integration $integration)
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
addOption($option, $value)