Skip to content

Commit 8ecc179

Browse files
committed
Merge branch 'sprint-develop' into MQE-431
2 parents 6f0774b + 9c1f44e commit 8ecc179

File tree

20 files changed

+1009
-81
lines changed

20 files changed

+1009
-81
lines changed

etc/di.xml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,4 +309,36 @@
309309
<argument name="reader" xsi:type="object">Magento\FunctionalTestingFramework\Config\Reader\ActionGroupData</argument>
310310
</arguments>
311311
</virtualType>
312+
313+
<!--Config for Suite Data -->
314+
315+
<type name="Magento\FunctionalTestingFramework\Suite\Parsers\SuiteDataParser">
316+
<arguments>
317+
<argument name="suiteData" xsi:type="object">Magento\FunctionalTestingFramework\Suite\Config\SuiteData</argument>
318+
</arguments>
319+
</type>
320+
<virtualType name="Magento\FunctionalTestingFramework\Suite\Config\SuiteData" type="Magento\FunctionalTestingFramework\Config\Data">
321+
<arguments>
322+
<argument name="reader" xsi:type="object">Magento\FunctionalTestingFramework\Config\Reader\SuiteData</argument>
323+
</arguments>
324+
</virtualType>
325+
<virtualType name="Magento\FunctionalTestingFramework\Config\SchemaLocator\SuiteData" type="Magento\FunctionalTestingFramework\Config\SchemaLocator">
326+
<arguments>
327+
<argument name="schemaPath" xsi:type="string">Magento/FunctionalTestingFramework/Suite/etc/suiteSchema.xsd</argument>
328+
</arguments>
329+
</virtualType>
330+
<virtualType name="Magento\FunctionalTestingFramework\Config\Reader\SuiteData" type="Magento\FunctionalTestingFramework\Config\Reader\Filesystem">
331+
<arguments>
332+
<argument name="fileResolver" xsi:type="object">Magento\FunctionalTestingFramework\Config\FileResolver\Root</argument>
333+
<argument name="converter" xsi:type="object">Magento\FunctionalTestingFramework\Config\Converter</argument>
334+
<argument name="schemaLocator" xsi:type="object">Magento\FunctionalTestingFramework\Config\SchemaLocator\SuiteData</argument>
335+
<argument name="idAttributes" xsi:type="array">
336+
<item name="/config/suite" xsi:type="string">name</item>
337+
<item name="/config/suite/include/group" xsi:type="string">name</item>
338+
<item name="/config/suite/exclude/group" xsi:type="string">name</item>
339+
</argument>
340+
<argument name="fileName" xsi:type="string">*.xml</argument>
341+
<argument name="defaultScope" xsi:type="string">_suite</argument>
342+
</arguments>
343+
</virtualType>
312344
</config>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
/**
3+
* Copyright © 2017 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\FunctionalTestingFramework\Config\FileResolver;
7+
8+
use Magento\FunctionalTestingFramework\Config\FileResolverInterface;
9+
use Magento\FunctionalTestingFramework\Util\Iterator\File;
10+
11+
class Root implements FileResolverInterface
12+
{
13+
14+
/**
15+
* Retrieve the list of configuration files with given name that relate to specified scope at the tests level
16+
*
17+
* @param string $filename
18+
* @param string $scope
19+
* @return array|\Iterator,\Countable
20+
*/
21+
public function get($filename, $scope)
22+
{
23+
$paths = glob(dirname(TESTS_BP) . DIRECTORY_SEPARATOR . $scope . DIRECTORY_SEPARATOR . $filename);
24+
25+
return new File($paths);
26+
}
27+
}

src/Magento/FunctionalTestingFramework/DataGenerator/Objects/EntityDataObject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ public function getDataByName($dataName, $uniDataFormat)
204204
* category->id)
205205
*
206206
* @param string $dataKey
207-
* @return array|null
207+
* @return string|null
208208
*/
209209
public function getVarReference($dataKey)
210210
{

src/Magento/FunctionalTestingFramework/DataGenerator/Persist/Curl/FrontendExecutor.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,16 +132,16 @@ protected function setCookies()
132132
* @param string $url
133133
* @param array $data
134134
* @param string $method
135-
* @param mixed $headers
135+
* @param array $headers
136136
* @return void
137137
* @throws TestFrameworkException
138138
*/
139139
public function write($url, $data = [], $method = CurlInterface::POST, $headers = [])
140140
{
141-
if(isset($data['customer_email'])) {
141+
if (isset($data['customer_email'])) {
142142
unset($data['customer_email']);
143143
}
144-
if(isset($data['customer_password'])) {
144+
if (isset($data['customer_password'])) {
145145
unset($data['customer_password']);
146146
}
147147
$apiUrl = parent::$baseUrl . $url;
@@ -190,7 +190,7 @@ public function read($successRegex = null, $returnRegex = null)
190190
* Add additional option to cURL.
191191
*
192192
* @param int $option the CURLOPT_* constants
193-
* @param mixed $value
193+
* @param int|string|bool|array $value
194194
* @return void
195195
*/
196196
public function addOption($option, $value)

src/Magento/FunctionalTestingFramework/ObjectManager/ObjectHandlerInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ public static function getInstance();
2121
/**
2222
* Function to return a single object by name
2323
*
24-
* @param string $jsonDefitionName
24+
* @param string $objectName
2525
* @return object
2626
*/
27-
public function getObject($jsonDefitionName);
27+
public function getObject($objectName);
2828

2929
/**
3030
* Function to return all objects the handler is responsible for

0 commit comments

Comments
 (0)