Skip to content

Commit ee8ac1e

Browse files
authored
Merge pull request #575 from magento-performance/ACPT-1687
ACPT-1687: Move State Comparator/Collector into proper place
2 parents 57138e7 + c179f4d commit ee8ac1e

File tree

15 files changed

+29
-22
lines changed

15 files changed

+29
-22
lines changed

dev/tests/integration/testsuite/Magento/Framework/ObjectManager/ResetAfterRequestTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
use Magento\Framework\Exception\RuntimeException;
1212
use Magento\Framework\ObjectManager\FactoryInterface as ObjectManagerFactoryInterface;
1313
use Magento\Framework\ObjectManagerInterface;
14-
use Magento\GraphQl\App\State\Collector;
15-
use Magento\GraphQl\App\State\Comparator;
16-
use Magento\GraphQl\App\State\CompareType;
14+
use Magento\Framework\TestFramework\ApplicationStateComparator\Collector;
15+
use Magento\Framework\TestFramework\ApplicationStateComparator\Comparator;
16+
use Magento\Framework\TestFramework\ApplicationStateComparator\CompareType;
1717

1818
/**
1919
* Test that verifies that resetState method for classes cause the state to be the same as it was initially constructed

dev/tests/integration/testsuite/Magento/GraphQl/App/State/GraphQlStateDiff.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
use Magento\Framework\Exception\LocalizedException;
1818
use Magento\Framework\Exception\NoSuchEntityException;
1919
use Magento\Framework\ObjectManagerInterface;
20+
use Magento\Framework\TestFramework\ApplicationStateComparator\Comparator;
21+
use Magento\Framework\TestFramework\ApplicationStateComparator\ObjectManager;
2022
use Magento\GraphQl\Quote\GetMaskedQuoteIdByReservedOrderId;
2123
use Magento\Integration\Api\CustomerTokenServiceInterface;
2224
use Magento\Quote\Model\MaskedQuoteIdToQuoteIdInterface;

dev/tests/integration/testsuite/Magento/GraphQl/App/State/CollectedObject.php renamed to lib/internal/Magento/Framework/TestFramework/ApplicationStateComparator/CollectedObject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
declare(strict_types=1);
77

8-
namespace Magento\GraphQl\App\State;
8+
namespace Magento\Framework\TestFramework\ApplicationStateComparator;
99

1010
/**
1111
* Immutable recursive data structure that holds copy of properties from collected objects. Created by Collector.

dev/tests/integration/testsuite/Magento/GraphQl/App/State/CollectedObjectConstructedAndCurrent.php renamed to lib/internal/Magento/Framework/TestFramework/ApplicationStateComparator/CollectedObjectConstructedAndCurrent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
declare(strict_types=1);
77

8-
namespace Magento\GraphQl\App\State;
8+
namespace Magento\Framework\TestFramework\ApplicationStateComparator;
99

1010
/**
1111
* Returned by Collector

dev/tests/integration/testsuite/Magento/GraphQl/App/State/Collector.php renamed to lib/internal/Magento/Framework/TestFramework/ApplicationStateComparator/Collector.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
*/
66
declare(strict_types=1);
77

8-
namespace Magento\GraphQl\App\State;
8+
namespace Magento\Framework\TestFramework\ApplicationStateComparator;
99

1010
use Magento\Framework\ObjectManager\ResetAfterRequestInterface;
1111
use Magento\Framework\ObjectManagerInterface;
12-
use Magento\GraphQl\App\State\ObjectManagerInterface as StateObjectManagerInterface;
12+
use Magento\Framework\TestFramework\ApplicationStateComparator\ObjectManagerInterface as StateObjectManagerInterface;
1313

1414
/**
1515
* Collects shared objects from ObjectManager and copies properties for later comparison
@@ -160,7 +160,7 @@ public function getPropertiesConstructedAndCurrent(): array
160160
public function getPropertiesFromObject(
161161
object $object,
162162
CompareType $compareType,
163-
int $recursionLevel = 1,
163+
int $recursionLevel = 0,
164164
): CollectedObject {
165165
$className = get_class($object);
166166
$skipList = $compareType == CompareType::CompareBetweenRequests ?

dev/tests/integration/testsuite/Magento/GraphQl/App/State/Comparator.php renamed to lib/internal/Magento/Framework/TestFramework/ApplicationStateComparator/Comparator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
declare(strict_types=1);
77

8-
namespace Magento\GraphQl\App\State;
8+
namespace Magento\Framework\TestFramework\ApplicationStateComparator;
99

1010
use Magento\Framework\ObjectManager\NoninterceptableInterface;
1111

dev/tests/integration/testsuite/Magento/GraphQl/App/State/CompareType.php renamed to lib/internal/Magento/Framework/TestFramework/ApplicationStateComparator/CompareType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
declare(strict_types=1);
77

8-
namespace Magento\GraphQl\App\State;
8+
namespace Magento\Framework\TestFramework\ApplicationStateComparator;
99

1010
/**
1111
* What type of comparison

dev/tests/integration/testsuite/Magento/GraphQl/App/State/DynamicFactoryDecorator.php renamed to lib/internal/Magento/Framework/TestFramework/ApplicationStateComparator/DynamicFactoryDecorator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
declare(strict_types=1);
77

8-
namespace Magento\GraphQl\App\State;
8+
namespace Magento\Framework\TestFramework\ApplicationStateComparator;
99

1010
use Magento\Framework\ObjectManager\Factory\Dynamic\Developer;
1111
use Magento\Framework\ObjectManager\ResetAfterRequestInterface;

dev/tests/integration/testsuite/Magento/GraphQl/App/State/ObjectManager.php renamed to lib/internal/Magento/Framework/TestFramework/ApplicationStateComparator/ObjectManager.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
declare(strict_types=1);
77

8-
namespace Magento\GraphQl\App\State;
8+
namespace Magento\Framework\TestFramework\ApplicationStateComparator;
99

1010
use Magento\Framework\ObjectManager\ResetAfterRequestInterface;
1111
use Magento\TestFramework\ObjectManager as TestFrameworkObjectManager;
@@ -83,8 +83,8 @@ class ObjectManager extends TestFrameworkObjectManager implements ObjectManagerI
8383
'Magento\Framework\Logger\LoggerProxy',
8484
'Magento\TestFramework\ErrorLog\Logger',
8585
'Magento\SalesSequence\Model\Builder',
86-
'Magento\GraphQl\App\State\SkipListAndFilterList',
87-
'Magento\GraphQl\App\State\Collector',
86+
'Magento\Framework\TestFramework\ApplicationStateComparator\SkipListAndFilterList',
87+
'Magento\Framework\TestFramework\ApplicationStateComparator\Collector',
8888
'Magento\Framework\App\Filesystem\DirectoryList',
8989
'Magento\Framework\Filesystem\DirectoryList',
9090
'Magento\Framework\App\DeploymentConfig',

dev/tests/integration/testsuite/Magento/GraphQl/App/State/ObjectManagerInterface.php renamed to lib/internal/Magento/Framework/TestFramework/ApplicationStateComparator/ObjectManagerInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
declare(strict_types=1);
77

8-
namespace Magento\GraphQl\App\State;
8+
namespace Magento\Framework\TestFramework\ApplicationStateComparator;
99

1010
use Magento\Framework\ObjectManagerInterface as FrameworkObjectManagerInterface;
1111
use Weakmap;

0 commit comments

Comments
 (0)