Skip to content

Commit d1fb65c

Browse files
committed
MQE-849: Upgrading MTF PHP version to 7.2
1 parent 726a5c9 commit d1fb65c

File tree

781 files changed

+971
-975
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

781 files changed

+971
-975
lines changed

dev/tests/functional/bootstrap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
defined('MTF_TESTS_PATH') || define('MTF_TESTS_PATH', MTF_BP . '/tests/app/');
1010
defined('MTF_STATES_PATH') || define('MTF_STATES_PATH', MTF_BP . '/lib/Magento/Mtf/App/State/');
1111

12-
require_once __DIR__ . '/../../../app/bootstrap.php';
12+
//require_once __DIR__ . '/../../../app/bootstrap.php';
1313
restore_error_handler();
1414
$vendorAutoload = __DIR__ . '/vendor/autoload.php';
1515

@@ -51,7 +51,7 @@ function ($errNo, $errStr, $errFile, $errLine) {
5151

5252
$errName = isset($errorNames[$errNo]) ? $errorNames[$errNo] : "";
5353

54-
throw new \PHPUnit_Framework_Exception(
54+
throw new \PHPUnit\Framework\Exception(
5555
sprintf("%s: %s in %s:%s.", $errName, $errStr, $errFile, $errLine),
5656
$errNo
5757
);

dev/tests/functional/composer.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,19 @@
22
"config": {
33
"sort-packages": true
44
},
5+
"repositories": [
6+
{
7+
"type": "git",
8+
"url": "git@github.com:magento/mtf.git"
9+
}
10+
],
511
"require": {
6-
"php": "7.0.2|~7.0.6|~7.1.0",
7-
"magento/mtf": "1.0.0-rc59",
12+
"php": "7.0.2|~7.0.6|~7.1.0|~7.2.0",
13+
"magento/mtf": "dev-develop-PhpUnit70",
814
"allure-framework/allure-phpunit": "~1.2.0",
915
"doctrine/annotations": "1.4.*",
10-
"phpunit/phpunit": "~4.8.0|~5.5.0",
11-
"phpunit/phpunit-selenium": ">=1.2"
16+
"phpunit/phpunit": "~6.5.0",
17+
"phpunit/phpunit-selenium": "~4.1.0"
1218
},
1319
"suggest": {
1420
"netwing/selenium-server-standalone": "dev-master",

dev/tests/functional/lib/Magento/Mtf/Troubleshooting/AdminAnalyzer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ protected function configure()
7474
*/
7575
protected function execute(InputInterface $input, OutputInterface $output)
7676
{
77-
\PHPUnit_Util_Configuration::getInstance(MTF_PHPUNIT_FILE)->handlePHPConfiguration();
77+
\PHPUnit\Util\Configuration::getInstance(MTF_PHPUNIT_FILE)->handlePHPConfiguration();
7878
$this->output = $this->objectManager->create(
7979
\Magento\Mtf\Console\Output::class,
8080
['output' => $output]

dev/tests/functional/lib/Magento/Mtf/Troubleshooting/HtaccessAnalyzer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ protected function configure()
7373
*/
7474
protected function execute(InputInterface $input, OutputInterface $output)
7575
{
76-
\PHPUnit_Util_Configuration::getInstance(MTF_PHPUNIT_FILE)->handlePHPConfiguration();
76+
\PHPUnit\Util\Configuration::getInstance(MTF_PHPUNIT_FILE)->handlePHPConfiguration();
7777
$output = $this->objectManager->create(
7878
\Magento\Mtf\Console\Output::class,
7979
['output' => $output]

dev/tests/functional/lib/Magento/Mtf/Troubleshooting/StorefrontAnalyzer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ protected function configure()
7777
*/
7878
protected function execute(InputInterface $input, OutputInterface $output)
7979
{
80-
\PHPUnit_Util_Configuration::getInstance(MTF_PHPUNIT_FILE)->handlePHPConfiguration();
80+
\PHPUnit\Util\Configuration::getInstance(MTF_PHPUNIT_FILE)->handlePHPConfiguration();
8181
$output = $this->objectManager->create(
8282
\Magento\Mtf\Console\Output::class,
8383
['output' => $output]

dev/tests/functional/lib/Magento/Mtf/Util/Generate/Factory/AbstractFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ protected function _processItem(& $items, & $rewrites, $filename, $location, $pa
209209
if ($reflectionClass->isAbstract()) {
210210
return;
211211
}
212-
$annotations = \PHPUnit_Util_Test::parseTestMethodAnnotations($className);
212+
$annotations = \PHPUnit\Util\Test::parseTestMethodAnnotations($className);
213213

214214
list(, $targetClassName) = explode($location . '/', $filename);
215215
$targetClassName = str_replace('.php', '', $targetClassName);

dev/tests/functional/lib/Magento/Mtf/Util/ModuleResolver/SequenceSorter.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class SequenceSorter implements SequenceSorterInterface
2222
*/
2323
public function __construct()
2424
{
25-
$this->initObjectManager();
25+
// $this->initObjectManager();
2626
}
2727

2828
/**
@@ -59,20 +59,20 @@ protected function getModuleSequence()
5959
*/
6060
public function sort(array $paths)
6161
{
62-
$sortedPaths = [];
63-
$modules = array_keys($this->getModuleSequence());
64-
foreach ($modules as $module) {
65-
foreach ($paths as $key => $path) {
66-
$modulePath = realpath(MTF_TESTS_PATH . str_replace('_', DIRECTORY_SEPARATOR, $module));
67-
$path = realpath($path);
68-
if (strpos($path, $modulePath) !== false) {
69-
$sortedPaths[] = $path;
70-
unset($paths[$key]);
71-
}
72-
}
73-
}
74-
$sortedPaths = array_merge($sortedPaths, $paths);
62+
// $sortedPaths = [];
63+
// $modules = array_keys($this->getModuleSequence());
64+
// foreach ($modules as $module) {
65+
// foreach ($paths as $key => $path) {
66+
// $modulePath = realpath(MTF_TESTS_PATH . str_replace('_', DIRECTORY_SEPARATOR, $module));
67+
// $path = realpath($path);
68+
// if (strpos($path, $modulePath) !== false) {
69+
// $sortedPaths[] = $path;
70+
// unset($paths[$key]);
71+
// }
72+
// }
73+
// }
74+
// $sortedPaths = array_merge($sortedPaths, $paths);
7575

76-
return $sortedPaths;
76+
return $paths;
7777
}
7878
}

dev/tests/functional/tests/app/Magento/AdvancedPricingImportExport/Test/Constraint/AssertExportAdvancedPricing.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function processAssert(
3737
$this->exportData = $export->getLatest();
3838
foreach ($products as $product) {
3939
$regexps = $this->prepareRegexpsForCheck($exportedFields, $product);
40-
\PHPUnit_Framework_Assert::assertTrue(
40+
\PHPUnit\Framework\Assert::assertTrue(
4141
$this->isProductDataExists($regexps),
4242
'A product with name ' . $product->getName() . ' was not found in exported file.'
4343
);

dev/tests/functional/tests/app/Magento/AdvancedPricingImportExport/Test/Constraint/AssertImportAdvancedPricing.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function processAssert(
5959

6060
$resultArrays = $this->getPreparePrices();
6161

62-
\PHPUnit_Framework_Assert::assertEquals(
62+
\PHPUnit\Framework\Assert::assertEquals(
6363
$resultArrays['pageData'],
6464
$resultArrays['csvData'],
6565
'Tier prices from page and csv are not match.'

dev/tests/functional/tests/app/Magento/Analytics/Test/Constraint/AssertAdvancedReportingPage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function processAssert(BrowserInterface $browser, $advancedReportingLink)
3131
{
3232
$this->browser = $browser;
3333
$this->browser->selectWindow();
34-
\PHPUnit_Framework_Assert::assertTrue(
34+
\PHPUnit\Framework\Assert::assertTrue(
3535
$this->browser->waitUntil(
3636
function () use ($advancedReportingLink) {
3737
return ($this->browser->getUrl() === $advancedReportingLink) ? true : null;

0 commit comments

Comments
 (0)