From 8b7735e9a79c4d2c5c82698cfcd7cb8a833d2fda Mon Sep 17 00:00:00 2001 From: Sergey Ivashchenko Date: Fri, 27 Mar 2015 11:53:15 +0200 Subject: [PATCH 1/2] MAGETWO-33616: MTF Configuration code clean up --- dev/tests/functional/bootstrap.php | 1 - .../CurlTransport/BackendDecorator.php | 15 ++++++------- .../Backend/Test/Fixture/Admin/SuperAdmin.php | 4 ++-- .../Backend/Test/Fixture/GlobalSearch.xml | 2 +- .../Backend/Test/Handler/Extractor.php | 5 ++--- .../Bundle/Test/Fixture/BundleProduct.xml | 2 +- .../Test/Handler/BundleProduct/Curl.php | 10 +++++---- .../Test/Fixture/CatalogAttributeSet.xml | 2 +- .../Test/Fixture/CatalogProductAttribute.xml | 2 +- .../Test/Fixture/CatalogProductSimple.xml | 2 +- .../Fixture/CatalogProductSimple/TaxClass.php | 3 +-- .../Test/Fixture/CatalogProductVirtual.xml | 2 +- .../Magento/Catalog/Test/Fixture/Category.xml | 2 +- .../Test/Handler/CatalogAttributeSet/Curl.php | 1 - .../Handler/CatalogProductSimple/Curl.php | 3 ++- .../Catalog/Test/Handler/Category/Curl.php | 1 - .../Handler/Curl/CreateProductAttribute.php | 1 - .../CatalogRule/Test/Fixture/CatalogRule.xml | 2 +- .../Test/Handler/CatalogRule/Curl.php | 1 - .../Test/Fixture/CatalogSearchQuery.xml | 2 +- .../Test/Handler/CatalogSearchQuery/Curl.php | 1 - .../Magento/Checkout/Test/Fixture/Cart.xml | 2 +- .../Test/Fixture/CheckoutAgreement.xml | 2 +- .../Test/Handler/CheckoutAgreement/Curl.php | 1 - .../app/Magento/Cms/Test/Fixture/CmsBlock.xml | 2 +- .../app/Magento/Cms/Test/Fixture/CmsPage.xml | 2 +- .../Cms/Test/Handler/CmsBlock/Curl.php | 1 - .../Magento/Cms/Test/Handler/CmsPage/Curl.php | 10 +++++---- .../Test/Fixture/ConfigurableProduct.xml | 2 +- .../Test/Handler/ConfigurableProduct/Curl.php | 10 +++++---- .../Magento/Core/Test/Fixture/ConfigData.xml | 2 +- .../Core/Test/Fixture/SystemVariable.xml | 2 +- .../Core/Test/Handler/ConfigData/Curl.php | 7 +++--- .../Core/Test/Handler/SystemVariable/Curl.php | 1 - .../Test/Fixture/CurrencySymbolEntity.xml | 2 +- .../Handler/CurrencySymbolEntity/Curl.php | 1 - .../Magento/Customer/Test/Fixture/Address.xml | 2 +- .../Customer/Test/Fixture/Customer.xml | 2 +- .../Test/Fixture/CustomerGroupInjectable.xml | 2 +- .../Handler/Curl/CreateCustomerBackend.php | 1 - .../Test/Handler/Curl/CreateCustomerGroup.php | 1 - .../Customer/Test/Handler/Customer/Curl.php | 1 + .../Handler/CustomerGroupInjectable/Curl.php | 1 - .../Test/Handler/Webapi/CreateCustomer.php | 2 +- .../Directory/Test/Repository/ConfigData.xml | 12 +++++----- .../Test/Fixture/DownloadableProduct.xml | 2 +- .../Test/Handler/DownloadableProduct/Curl.php | 10 +++++---- .../GiftMessage/Test/Fixture/GiftMessage.xml | 2 +- .../Test/Fixture/GoogleShoppingAttribute.xml | 2 +- .../Test/Fixture/GroupedProduct.xml | 2 +- .../Test/Fixture/ImportExport.xml | 2 +- .../Test/Constraint/AssertSuccessInstall.php | 5 +++++ .../Magento/Install/Test/Fixture/Install.xml | 2 +- .../Install/Test/TestCase/InstallTest.php | 17 +++++++------- .../Integration/Test/Fixture/Integration.xml | 2 +- .../Test/Handler/Integration/Curl.php | 1 - .../Newsletter/Test/Fixture/Template.xml | 2 +- .../Newsletter/Test/Handler/Template/Curl.php | 1 - .../Test/Repository/ConfigData.xml | 8 +++---- .../Magento/Review/Test/Fixture/Rating.xml | 2 +- .../Magento/Review/Test/Fixture/Review.xml | 2 +- .../Review/Test/Handler/Rating/Curl.php | 1 - .../Review/Test/Handler/Review/Curl.php | 1 - .../Magento/Sitemap/Test/Fixture/Sitemap.xml | 2 +- .../Sitemap/Test/Handler/Sitemap/Curl.php | 1 - .../app/Magento/Store/Test/Fixture/Store.xml | 2 +- .../Magento/Store/Test/Fixture/StoreGroup.xml | 2 +- .../Magento/Store/Test/Fixture/Website.xml | 2 +- .../Magento/Store/Test/Handler/Store/Curl.php | 1 - .../Store/Test/Handler/StoreGroup/Curl.php | 1 - .../Store/Test/Handler/Website/Curl.php | 1 - .../app/Magento/Tax/Test/Fixture/TaxClass.xml | 2 +- .../app/Magento/Tax/Test/Fixture/TaxRate.xml | 2 +- .../app/Magento/Tax/Test/Fixture/TaxRule.xml | 2 +- .../Tax/Test/Handler/TaxClass/Curl.php | 1 - .../Magento/Tax/Test/Handler/TaxRate/Curl.php | 1 - .../Magento/Tax/Test/Handler/TaxRule/Curl.php | 1 - .../Ups/Test/Repository/ConfigData.xml | 22 +++++++++---------- .../UrlRewrite/Test/Fixture/UrlRewrite.xml | 2 +- .../Test/Handler/UrlRewrite/Curl.php | 1 - .../app/Magento/User/Test/Fixture/Role.xml | 2 +- .../app/Magento/User/Test/Fixture/User.xml | 2 +- .../Test/Fixture/User/CurrentPassword.php | 6 ++--- .../Magento/User/Test/Handler/Role/Curl.php | 10 +++++---- .../Magento/User/Test/Handler/User/Curl.php | 1 - 85 files changed, 126 insertions(+), 140 deletions(-) diff --git a/dev/tests/functional/bootstrap.php b/dev/tests/functional/bootstrap.php index b661b84d1cecc..5a4f9a7c490de 100644 --- a/dev/tests/functional/bootstrap.php +++ b/dev/tests/functional/bootstrap.php @@ -4,7 +4,6 @@ * See COPYING.txt for license details. */ -session_start(); defined('MTF_BOOT_FILE') || define('MTF_BOOT_FILE', __FILE__); defined('MTF_BP') || define('MTF_BP', str_replace('\\', '/', (__DIR__))); require_once __DIR__ . '/../../../app/bootstrap.php'; diff --git a/dev/tests/functional/lib/Magento/Mtf/Util/Protocol/CurlTransport/BackendDecorator.php b/dev/tests/functional/lib/Magento/Mtf/Util/Protocol/CurlTransport/BackendDecorator.php index c4b2a9d7f85cc..ff02e15272bd9 100644 --- a/dev/tests/functional/lib/Magento/Mtf/Util/Protocol/CurlTransport/BackendDecorator.php +++ b/dev/tests/functional/lib/Magento/Mtf/Util/Protocol/CurlTransport/BackendDecorator.php @@ -6,7 +6,7 @@ namespace Magento\Mtf\Util\Protocol\CurlTransport; -use Magento\Mtf\Config; +use Magento\Mtf\Config\DataInterface; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; @@ -40,7 +40,7 @@ class BackendDecorator implements CurlInterface /** * System config * - * @var Config + * @var DataInterface */ protected $configuration; @@ -48,9 +48,9 @@ class BackendDecorator implements CurlInterface * Constructor * * @param CurlTransport $transport - * @param Config $configuration + * @param DataInterface $configuration */ - public function __construct(CurlTransport $transport, Config $configuration) + public function __construct(CurlTransport $transport, DataInterface $configuration) { $this->transport = $transport; $this->configuration = $configuration; @@ -65,11 +65,10 @@ public function __construct(CurlTransport $transport, Config $configuration) */ protected function authorize() { - $url = $_ENV['app_backend_url'] . - $this->configuration->getParameter('application/backendLoginUrl'); + $url = $_ENV['app_backend_url'] . $this->configuration->get('application/0/backendLoginUrl/0/value'); $data = [ - 'login[username]' => $this->configuration->getParameter('application/backendLogin'), - 'login[password]' => $this->configuration->getParameter('application/backendPassword'), + 'login[username]' => $this->configuration->get('application/0/backendLogin/0/value'), + 'login[password]' => $this->configuration->get('application/0/backendPassword/0/value'), ]; $this->transport->write(CurlInterface::POST, $url, '1.0', [], $data); $response = $this->read(); diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Admin/SuperAdmin.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Admin/SuperAdmin.php index fd1a66d884fbe..3d18543896556 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Admin/SuperAdmin.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Admin/SuperAdmin.php @@ -22,10 +22,10 @@ protected function _initData() $this->_data = [ 'fields' => [ 'username' => [ - 'value' => $this->_configuration->getParameter('application/backendLogin'), + 'value' => $this->_configuration->get('application/0/backendLogin/0/value'), ], 'password' => [ - 'value' => $this->_configuration->getParameter('application/backendPassword'), + 'value' => $this->_configuration->get('application/0/backendPassword/0/value'), ], ], ]; diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch.xml b/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch.xml index e40e21c4fca28..7b1c3f2aeac1d 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch.xml +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + catalogProductSimple::default::name diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Extractor.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Extractor.php index 967d142da277c..3df57e717b293 100755 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Extractor.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Extractor.php @@ -7,7 +7,6 @@ namespace Magento\Backend\Test\Handler; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; @@ -62,8 +61,8 @@ public function __construct($url, $regExpPattern, $isAll = false) */ public function getData() { - /** @var \Magento\Mtf\Config $config */ - $config = \Magento\Mtf\ObjectManagerFactory::getObjectManager()->get('Magento\Mtf\Config'); + /** @var \Magento\Mtf\Config\DataInterface $config */ + $config = \Magento\Mtf\ObjectManagerFactory::getObjectManager()->get('Magento\Mtf\Config\DataInterface'); $url = $_ENV['app_backend_url'] . $this->url; $curl = new BackendDecorator(new CurlTransport(), $config); $curl->addOption(CURLOPT_HEADER, 1); diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct.xml b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct.xml index 6b345b542bb84..b9f96e1cb55a7 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct.xml +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + BundleProduct %isolation% diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/BundleProduct/Curl.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/BundleProduct/Curl.php index cbd47bd232e4e..6eeb06506c9cd 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/BundleProduct/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/BundleProduct/Curl.php @@ -9,7 +9,8 @@ use Magento\Bundle\Test\Fixture\BundleProduct; use Magento\Catalog\Test\Handler\CatalogProductSimple\Curl as ProductCurl; use Magento\Mtf\Fixture\FixtureInterface; -use Magento\Mtf\Config; +use Magento\Mtf\Config\DataInterface; +use Magento\Mtf\System\Event\EventManagerInterface; /** * Create new bundle product via curl. @@ -25,11 +26,12 @@ class Curl extends ProductCurl implements BundleProductInterface /** * @constructor - * @param Config $configuration + * @param DataInterface $configuration + * @param EventManagerInterface $eventManager */ - public function __construct(Config $configuration) + public function __construct(DataInterface $configuration, EventManagerInterface $eventManager) { - parent::__construct($configuration); + parent::__construct($configuration, $eventManager); $this->mappingData += [ 'selection_can_change_qty' => [ diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet.xml index e30dafaff1c5a..20c3c831f6e62 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + Default_attribute_set_%isolation% diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute.xml index 0a33bf96c60d6..1e99a0752d4e4 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + attribute_label%isolation% diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.xml index 1815359930d5d..59bc10f7eeecd 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + Test simple product %isolation% diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/TaxClass.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/TaxClass.php index 8ca245b0c1607..7bc605d82acca 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/TaxClass.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/TaxClass.php @@ -9,7 +9,6 @@ use Magento\Tax\Test\Fixture\TaxClass as FixtureTaxClass; use Magento\Mtf\Fixture\FixtureFactory; use Magento\Mtf\Fixture\FixtureInterface; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; @@ -89,7 +88,7 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, $data protected function setTaxClassId($taxClassName) { $url = $_ENV['app_backend_url'] . 'tax/rule/new/'; - $config = \Magento\Mtf\ObjectManagerFactory::getObjectManager()->create('Magento\Mtf\Config'); + $config = \Magento\Mtf\ObjectManagerFactory::getObjectManager()->create('Magento\Mtf\Config\DataInterface'); $curl = new BackendDecorator(new CurlTransport(), $config); $curl->addOption(CURLOPT_HEADER, 1); $curl->write(CurlInterface::POST, $url, '1.0', [], []); diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.xml index fd551f743f338..158e62ce41f72 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + Test virtual product %isolation% diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category.xml index 663a249b5da66..9ea63b5e3616f 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + Category%isolation% diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogAttributeSet/Curl.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogAttributeSet/Curl.php index 8c7e5905afb73..b5f8585e01fe4 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogAttributeSet/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogAttributeSet/Curl.php @@ -9,7 +9,6 @@ use Magento\Catalog\Test\Fixture\CatalogAttributeSet; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php index 123ef506c991e..1e7ec99e39fe2 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php @@ -405,7 +405,8 @@ protected function createProduct(array $data, array $config) $curl->close(); if (!strpos($response, 'data-ui-id="messages-message-success"')) { - throw new \Exception("Product creation by curl handler was not successful! Response: $response"); + $this->_eventManager->dispatchEvent(['curl_failed'], [$response]); + throw new \Exception('Product creation by curl handler was not successful!'); } return $this->parseResponse($response); diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Category/Curl.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Category/Curl.php index 9770e6726048c..e684946a46f47 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Category/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Category/Curl.php @@ -8,7 +8,6 @@ use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Curl/CreateProductAttribute.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Curl/CreateProductAttribute.php index 6353c542d857e..632de082cfe61 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Curl/CreateProductAttribute.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Curl/CreateProductAttribute.php @@ -9,7 +9,6 @@ use Magento\Catalog\Test\Fixture\ProductAttribute; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/CatalogRule.xml b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/CatalogRule.xml index 073335f8ab0ff..88c2147c46a54 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/CatalogRule.xml +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/CatalogRule.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + CatalogPriceRule %isolation% diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Handler/CatalogRule/Curl.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Handler/CatalogRule/Curl.php index 1c6d9a58f8710..43089928c2c50 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Handler/CatalogRule/Curl.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Handler/CatalogRule/Curl.php @@ -9,7 +9,6 @@ use Magento\Backend\Test\Handler\Conditions; use Magento\CatalogRule\Test\Handler\CatalogRule; use Magento\Mtf\Fixture\FixtureInterface; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Fixture/CatalogSearchQuery.xml b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Fixture/CatalogSearchQuery.xml index 59b4b4ee904fa..940729a21995e 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Fixture/CatalogSearchQuery.xml +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Fixture/CatalogSearchQuery.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Handler/CatalogSearchQuery/Curl.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Handler/CatalogSearchQuery/Curl.php index 049e2e77a7d47..3381fe2680973 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Handler/CatalogSearchQuery/Curl.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Handler/CatalogSearchQuery/Curl.php @@ -8,7 +8,6 @@ use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Fixture/Cart.xml b/dev/tests/functional/tests/app/Magento/Checkout/Test/Fixture/Cart.xml index 564e190e5f0f6..9c79804bfe3b2 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Fixture/Cart.xml +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Fixture/Cart.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement.xml b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement.xml index 4a9a438e8460a..d1f5018824ca4 100644 --- a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement.xml +++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + - + diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsPage.xml b/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsPage.xml index 149bef091c831..071897f0c5b13 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsPage.xml +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsPage.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsBlock/Curl.php b/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsBlock/Curl.php index c3aefd941fc29..05564ee03f057 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsBlock/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsBlock/Curl.php @@ -8,7 +8,6 @@ use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsPage/Curl.php b/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsPage/Curl.php index 4187350d28d7a..a91b23ff28b1b 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsPage/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/Handler/CmsPage/Curl.php @@ -8,7 +8,8 @@ use Magento\Backend\Test\Handler\Conditions; use Magento\Mtf\Fixture\FixtureInterface; -use Magento\Mtf\Config; +use Magento\Mtf\Config\DataInterface; +use Magento\Mtf\System\Event\EventManagerInterface; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; @@ -55,12 +56,13 @@ class Curl extends Conditions implements CmsPageInterface /** * @constructor - * @param Config $configuration + * @param DataInterface $configuration + * @param EventManagerInterface $eventManager */ - public function __construct(Config $configuration) + public function __construct(DataInterface $configuration, EventManagerInterface $eventManager) { $this->mappingData = array_merge($this->mappingData, $this->additionalMappingData); - parent::__construct($configuration); + parent::__construct($configuration, $eventManager); } /** diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct.xml b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct.xml index 839a00ef4a807..6eb5ee6976ace 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct.xml +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + mappingData += [ 'is_percent' => [ diff --git a/dev/tests/functional/tests/app/Magento/Core/Test/Fixture/ConfigData.xml b/dev/tests/functional/tests/app/Magento/Core/Test/Fixture/ConfigData.xml index 8bed37c9f9ba9..6b95f1c29ea9e 100644 --- a/dev/tests/functional/tests/app/Magento/Core/Test/Fixture/ConfigData.xml +++ b/dev/tests/functional/tests/app/Magento/Core/Test/Fixture/ConfigData.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + - + close(); if (strpos($response, 'data-ui-id="messages-message-success"') === false) { - throw new \Exception("Settings are not applied! Response: $response"); + $this->_eventManager->dispatchEvent(['curl_failed'], [$response]); + throw new \Exception("Configuration settings are not applied! Url: $url"); } } @@ -128,7 +128,6 @@ protected function applyConfigSettings(array $data, $section) */ protected function getUrl($section) { - return $_ENV['app_backend_url'] . - 'admin/system_config/save/section/' . $section; + return $_ENV['app_backend_url'] . 'admin/system_config/save/section/' . $section; } } diff --git a/dev/tests/functional/tests/app/Magento/Core/Test/Handler/SystemVariable/Curl.php b/dev/tests/functional/tests/app/Magento/Core/Test/Handler/SystemVariable/Curl.php index 6c02a8ae428e7..0ded2518a3b8f 100644 --- a/dev/tests/functional/tests/app/Magento/Core/Test/Handler/SystemVariable/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Core/Test/Handler/SystemVariable/Curl.php @@ -8,7 +8,6 @@ use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/Fixture/CurrencySymbolEntity.xml b/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/Fixture/CurrencySymbolEntity.xml index ad576cb935980..9b37f90342b5b 100644 --- a/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/Fixture/CurrencySymbolEntity.xml +++ b/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/Fixture/CurrencySymbolEntity.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + Yes diff --git a/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/Handler/CurrencySymbolEntity/Curl.php b/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/Handler/CurrencySymbolEntity/Curl.php index d1b311772c512..34a5317bf187b 100644 --- a/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/Handler/CurrencySymbolEntity/Curl.php +++ b/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/Handler/CurrencySymbolEntity/Curl.php @@ -8,7 +8,6 @@ use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Address.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Address.xml index c092c7e6aa310..09e93bbf76968 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Address.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Address.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + John diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer.xml index d5afd5538951e..fe4bdb7814a70 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + John diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroupInjectable.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroupInjectable.xml index b470b1c21b5e3..cec2cec3a7461 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroupInjectable.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroupInjectable.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + customer_code_%isolation% diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomerBackend.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomerBackend.php index e9860e68c44a4..cad3c992efa46 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomerBackend.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomerBackend.php @@ -8,7 +8,6 @@ use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomerGroup.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomerGroup.php index 22410354e5802..dadc4e66523bb 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomerGroup.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Curl/CreateCustomerGroup.php @@ -8,7 +8,6 @@ use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Customer/Curl.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Customer/Curl.php index 1831cdcbd2168..67d98b313afe2 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Customer/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Customer/Curl.php @@ -179,6 +179,7 @@ protected function updateCustomer(array $data) $curl->close(); if (!strpos($response, 'data-ui-id="messages-message-success"')) { + $this->_eventManager->dispatchEvent(['curl_failed', [$response]]); throw new \Exception('Failed to update customer!'); } } diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerGroupInjectable/Curl.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerGroupInjectable/Curl.php index 4ca4adb67291b..f2f7c1b52e6d8 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerGroupInjectable/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerGroupInjectable/Curl.php @@ -9,7 +9,6 @@ use Magento\Backend\Test\Handler\Extractor; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Webapi/CreateCustomer.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Webapi/CreateCustomer.php index 0087460d6e6f6..af06e68b03ef8 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Webapi/CreateCustomer.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/Webapi/CreateCustomer.php @@ -24,7 +24,7 @@ class CreateCustomer extends Webapi */ public function persist(FixtureInterface $fixture = null) { - $configuration = $this->_configuration->getParameter('handler/webapi'); + $configuration = $this->_configuration->get('handler/0/webapi/0/value'); $soap = new SoapTransport($configuration['soap']); return $soap->call('customerCustomerList', $fixture->getData()); diff --git a/dev/tests/functional/tests/app/Magento/Directory/Test/Repository/ConfigData.xml b/dev/tests/functional/tests/app/Magento/Directory/Test/Repository/ConfigData.xml index 546ccb6cda264..1afdae4142c3c 100644 --- a/dev/tests/functional/tests/app/Magento/Directory/Test/Repository/ConfigData.xml +++ b/dev/tests/functional/tests/app/Magento/Directory/Test/Repository/ConfigData.xml @@ -9,27 +9,27 @@ - USD - UAH + USD + UAH - USD + USD - USD - CHF + USD + CHF - USD + USD diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct.xml b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct.xml index 572574f962f25..7c7caf2f5c249 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct.xml +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + DownloadableProduct_%isolation% diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Handler/DownloadableProduct/Curl.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Handler/DownloadableProduct/Curl.php index 9812c5b6aca7e..7d05456656c3c 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Handler/DownloadableProduct/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Handler/DownloadableProduct/Curl.php @@ -8,7 +8,8 @@ use Magento\Catalog\Test\Handler\CatalogProductSimple\Curl as ProductCurl; use Magento\Mtf\Fixture\FixtureInterface; -use Magento\Mtf\Config; +use Magento\Mtf\Config\DataInterface; +use Magento\Mtf\System\Event\EventManagerInterface; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; @@ -22,11 +23,12 @@ class Curl extends ProductCurl implements DownloadableProductInterface /** * Constructor * - * @param Config $configuration + * @param DataInterface $configuration + * @param EventManagerInterface $eventManager */ - public function __construct(Config $configuration) + public function __construct(DataInterface $configuration, EventManagerInterface $eventManager) { - parent::__construct($configuration); + parent::__construct($configuration, $eventManager); $this->mappingData += [ 'links_purchased_separately' => [ diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Fixture/GiftMessage.xml b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Fixture/GiftMessage.xml index be06e0300b468..d11995d1e7dc6 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Fixture/GiftMessage.xml +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Fixture/GiftMessage.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + Yes diff --git a/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Fixture/GoogleShoppingAttribute.xml b/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Fixture/GoogleShoppingAttribute.xml index 61944b24eed8f..b33b9b5cc9eb6 100644 --- a/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Fixture/GoogleShoppingAttribute.xml +++ b/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Fixture/GoogleShoppingAttribute.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + United States diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct.xml b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct.xml index 22c825f368067..5fc47bd6a0c65 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct.xml +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + GroupedProduct_%isolation% diff --git a/dev/tests/functional/tests/app/Magento/ImportExport/Test/Fixture/ImportExport.xml b/dev/tests/functional/tests/app/Magento/ImportExport/Test/Fixture/ImportExport.xml index 08b3dd3c55621..01f5463b5f052 100644 --- a/dev/tests/functional/tests/app/Magento/ImportExport/Test/Fixture/ImportExport.xml +++ b/dev/tests/functional/tests/app/Magento/ImportExport/Test/Fixture/ImportExport.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + Products diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertSuccessInstall.php b/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertSuccessInstall.php index 7bf6181d89616..2f7039d86953e 100644 --- a/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertSuccessInstall.php +++ b/dev/tests/functional/tests/app/Magento/Install/Test/Constraint/AssertSuccessInstall.php @@ -52,6 +52,11 @@ public function processAssert(Install $installPage, InstallConfig $installConfig $dbData = $installPage->getInstallBlock()->getDbInfo(); $allData = array_merge($user->getData(), $installConfig->getData()); + + foreach ($installConfig->getData() as $key => $value) { + $allData[$key] = isset($value['value']) ? $value['value'] : $value; + } + $allData['admin'] = $allData['web'] . $allData['admin'] . '/'; foreach ($this->adminFieldsList as $field) { diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/Fixture/Install.xml b/dev/tests/functional/tests/app/Magento/Install/Test/Fixture/Install.xml index f2d6025c12beb..d846de8f0bd45 100644 --- a/dev/tests/functional/tests/app/Magento/Install/Test/Fixture/Install.xml +++ b/dev/tests/functional/tests/app/Magento/Install/Test/Fixture/Install.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/TestCase/InstallTest.php b/dev/tests/functional/tests/app/Magento/Install/Test/TestCase/InstallTest.php index 96e18ffc8452c..74ec107e09a60 100644 --- a/dev/tests/functional/tests/app/Magento/Install/Test/TestCase/InstallTest.php +++ b/dev/tests/functional/tests/app/Magento/Install/Test/TestCase/InstallTest.php @@ -10,10 +10,9 @@ use Magento\Install\Test\Page\Install; use Magento\Install\Test\Fixture\Install as InstallConfig; use Magento\User\Test\Fixture\User; -use Magento\Mtf\Config; use Magento\Mtf\Fixture\FixtureFactory; use Magento\Mtf\TestCase\Injectable; -use Magento\Mtf\Config\GlobalConfig; +use Magento\Mtf\Config\DataInterface; use Magento\Install\Test\Constraint\AssertAgreementTextPresent; use Magento\Install\Test\Constraint\AssertSuccessfulReadinessCheck; use Magento\Mtf\ObjectManagerFactory; @@ -68,14 +67,14 @@ class InstallTest extends Injectable */ public function __prepare() { - $config = ObjectManagerFactory::getObjectManager()->get('Magento\Mtf\Config\GlobalConfig'); + $config = ObjectManagerFactory::getObjectManager()->get('Magento\Mtf\Config\DataInterface'); // Prepare config data - $configData['dbHost'] = $config->get('install/host'); - $configData['dbUser'] = $config->get('install/user'); - $configData['dbPassword'] = $config->get('install/password'); - $configData['dbName'] = $config->get('install/dbName'); - $configData['web'] = $config->get('install/baseUrl'); - $configData['admin'] = $config->get('install/backendName'); + $configData['dbHost'] = $config->get('install/0/host/0'); + $configData['dbUser'] = $config->get('install/0/user/0'); + $configData['dbPassword'] = $config->get('install/0/password/0'); + $configData['dbName'] = $config->get('install/0/dbName/0'); + $configData['web'] = $config->get('install/0/baseUrl/0'); + $configData['admin'] = $config->get('install/0/backendName/0'); return ['configData' => $configData]; } diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/Fixture/Integration.xml b/dev/tests/functional/tests/app/Magento/Integration/Test/Fixture/Integration.xml index 3e58557ff604b..30c8310ea5534 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/Fixture/Integration.xml +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/Fixture/Integration.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + default_integration_%isolation% diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/Handler/Integration/Curl.php b/dev/tests/functional/tests/app/Magento/Integration/Test/Handler/Integration/Curl.php index d8047148bec44..900572434e6de 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/Handler/Integration/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/Handler/Integration/Curl.php @@ -8,7 +8,6 @@ use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Fixture/Template.xml b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Fixture/Template.xml index 9d216c522278f..6311e64c6602a 100644 --- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Fixture/Template.xml +++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Fixture/Template.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + TemplateName%isolation% diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Handler/Template/Curl.php b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Handler/Template/Curl.php index 7578ea4425481..8d94f60cda0c4 100644 --- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Handler/Template/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Handler/Template/Curl.php @@ -8,7 +8,6 @@ use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/OfflinePayments/Test/Repository/ConfigData.xml b/dev/tests/functional/tests/app/Magento/OfflinePayments/Test/Repository/ConfigData.xml index 0e2819446d17c..a6eb9d9e85ee4 100644 --- a/dev/tests/functional/tests/app/Magento/OfflinePayments/Test/Repository/ConfigData.xml +++ b/dev/tests/functional/tests/app/Magento/OfflinePayments/Test/Repository/ConfigData.xml @@ -19,7 +19,7 @@ 1 1 - GB + GB @@ -40,7 +40,7 @@ 1 1 - GB + GB @@ -61,7 +61,7 @@ 1 1 - GB + GB @@ -82,7 +82,7 @@ 1 1 - GB + GB diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Rating.xml b/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Rating.xml index 99e16141dcdfc..d551947d8c420 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Rating.xml +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Rating.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + Rating %isolation% diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review.xml b/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review.xml index 50ede32fea8d7..a118552b4f5c6 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review.xml +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + Approved diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Rating/Curl.php b/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Rating/Curl.php index 58206282eb611..ea7b1d6bad431 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Rating/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Rating/Curl.php @@ -9,7 +9,6 @@ use Magento\Backend\Test\Handler\Extractor; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Review/Curl.php b/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Review/Curl.php index df3c3004b7c97..986d1f4883123 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Review/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Handler/Review/Curl.php @@ -6,7 +6,6 @@ namespace Magento\Review\Test\Handler\Review; -use Magento\Mtf\Config; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; diff --git a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Fixture/Sitemap.xml b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Fixture/Sitemap.xml index dc51c43e5dd1f..6927691a7aa8e 100644 --- a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Fixture/Sitemap.xml +++ b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Fixture/Sitemap.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + sitemap.xml diff --git a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Handler/Sitemap/Curl.php b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Handler/Sitemap/Curl.php index c8b09124666bd..e78e858ded474 100644 --- a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Handler/Sitemap/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Handler/Sitemap/Curl.php @@ -10,7 +10,6 @@ use Magento\Sitemap\Test\Handler\Sitemap; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store.xml b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store.xml index b9be593561d7c..3a95b594d8400 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store.xml +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup.xml b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup.xml index fcd43ace417f9..7b6a5ad692b1a 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup.xml +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Website.xml b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Website.xml index 261b506e96a61..0878f90e302a1 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Website.xml +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Website.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + Main Website diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Store/Curl.php b/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Store/Curl.php index aaa0e84ce103a..d6293b08cd50a 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Store/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Store/Curl.php @@ -8,7 +8,6 @@ use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Handler/StoreGroup/Curl.php b/dev/tests/functional/tests/app/Magento/Store/Test/Handler/StoreGroup/Curl.php index 9922064088af8..71faf510eed5e 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Handler/StoreGroup/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Handler/StoreGroup/Curl.php @@ -8,7 +8,6 @@ use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Website/Curl.php b/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Website/Curl.php index 4de4912701890..bbd183601e4ef 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Website/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Handler/Website/Curl.php @@ -8,7 +8,6 @@ use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxClass.xml b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxClass.xml index 13e6c00c52879..30710bb5b2f81 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxClass.xml +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxClass.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + Tax Class %isolation% diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRate.xml b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRate.xml index a344ad905106d..b9a4a30142690 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRate.xml +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRate.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + Tax Rate %isolation% diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule.xml b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule.xml index 82d0dc07793ae..b53f3f1eba5d9 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule.xml +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + TaxIdentifier%isolation% diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxClass/Curl.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxClass/Curl.php index 28e77379db72e..b6d6072bcb5a1 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxClass/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxClass/Curl.php @@ -8,7 +8,6 @@ use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRate/Curl.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRate/Curl.php index 6cc269c5525d8..e1b370a6e44f8 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRate/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRate/Curl.php @@ -8,7 +8,6 @@ use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRule/Curl.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRule/Curl.php index 2d47e8b3bdb62..872f49ae0387a 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRule/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRule/Curl.php @@ -8,7 +8,6 @@ use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/Ups/Test/Repository/ConfigData.xml b/dev/tests/functional/tests/app/Magento/Ups/Test/Repository/ConfigData.xml index a6d197824433e..6c8afa0db50de 100644 --- a/dev/tests/functional/tests/app/Magento/Ups/Test/Repository/ConfigData.xml +++ b/dev/tests/functional/tests/app/Magento/Ups/Test/Repository/ConfigData.xml @@ -29,17 +29,17 @@ https://wwwcie.ups.com/ups.app/xml/Track LBS - 11 - 12 - 14 - 54 - 59 - 65 - 01 - 02 - 03 - 07 - 08 + 11 + 12 + 14 + 54 + 59 + 65 + 01 + 02 + 03 + 07 + 08 0 0 diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.xml b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.xml index a73037a6417ce..f0fda4e5442de 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.xml +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + Main Website/Main Website Store/Default Store View diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Handler/UrlRewrite/Curl.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Handler/UrlRewrite/Curl.php index ccc680aab72bd..ab9aaa6a50f97 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Handler/UrlRewrite/Curl.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Handler/UrlRewrite/Curl.php @@ -8,7 +8,6 @@ use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/Role.xml b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/Role.xml index 671556ced6002..39ac5778e0cc3 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/Role.xml +++ b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/Role.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + AdminRole%isolation% diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User.xml b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User.xml index 1044838fb45f6..80c969cf4bbfe 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User.xml +++ b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + AdminUser%isolation% diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User/CurrentPassword.php b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User/CurrentPassword.php index 31ab14a90355b..7c7e8bc1d8a07 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User/CurrentPassword.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User/CurrentPassword.php @@ -36,10 +36,10 @@ class CurrentPassword implements FixtureInterface public function __construct(array $params, $data = '') { $this->params = $params; - /** @var \Magento\Mtf\Config $systemConfig */ + /** @var \Magento\Mtf\Config\DataInterface $systemConfig */ if ($data == '%current_password%') { - $systemConfig = ObjectManager::getInstance()->create('Magento\Mtf\Config'); - $data = $systemConfig->getParameter('application/backendPassword'); + $systemConfig = ObjectManager::getInstance()->create('Magento\Mtf\Config\DataInterface'); + $data = $systemConfig->get('application/0/backendPassword/0/value'); } $this->data = $data; } diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Handler/Role/Curl.php b/dev/tests/functional/tests/app/Magento/User/Test/Handler/Role/Curl.php index 857ae69621949..9fa901fa70271 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Handler/Role/Curl.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Handler/Role/Curl.php @@ -9,7 +9,8 @@ use Magento\Backend\Test\Handler\Extractor; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; +use Magento\Mtf\Config\DataInterface; +use Magento\Mtf\System\Event\EventManagerInterface; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; @@ -28,15 +29,16 @@ class Curl extends AbstractCurl implements RoleInterface /** * @constructor - * @param Config $configuration + * @param DataInterface $configuration + * @param EventManagerInterface $eventManager */ - public function __construct(Config $configuration) + public function __construct(DataInterface $configuration, EventManagerInterface $eventManager) { $this->mappingData = array_merge( (null !== $this->mappingData) ? $this->mappingData : [], $this->additionalMappingData ); - parent::__construct($configuration); + parent::__construct($configuration, $eventManager); } /** diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Handler/User/Curl.php b/dev/tests/functional/tests/app/Magento/User/Test/Handler/User/Curl.php index 1026e872f8922..a1b5ea977ca19 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Handler/User/Curl.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Handler/User/Curl.php @@ -9,7 +9,6 @@ use Magento\Backend\Test\Handler\Extractor; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Handler\Curl as AbstractCurl; -use Magento\Mtf\Config; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; From 4bad98a33bc16bf9b398e22e004263a6e90e888e Mon Sep 17 00:00:00 2001 From: Sergey Ivashchenko Date: Fri, 27 Mar 2015 16:51:50 +0200 Subject: [PATCH 2/2] MAGETWO-33616: MTF Configuration code clean up --- dev/tests/functional/composer.json | 2 +- dev/tests/functional/phpunit.xml.dist | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/dev/tests/functional/composer.json b/dev/tests/functional/composer.json index 256e8f34c4377..41482866c1b24 100644 --- a/dev/tests/functional/composer.json +++ b/dev/tests/functional/composer.json @@ -1,6 +1,6 @@ { "require": { - "magento/mtf": "1.0.0-rc20", + "magento/mtf": "1.0.0-rc21", "php": "~5.5.0|~5.6.0", "phpunit/phpunit": "4.1.0", "phpunit/phpunit-selenium": ">=1.2", diff --git a/dev/tests/functional/phpunit.xml.dist b/dev/tests/functional/phpunit.xml.dist index 06b2ee9b0603d..f99b813aa1073 100755 --- a/dev/tests/functional/phpunit.xml.dist +++ b/dev/tests/functional/phpunit.xml.dist @@ -26,7 +26,6 @@ - @@ -37,7 +36,6 @@ -