Skip to content

Commit 59239ac

Browse files
committed
MC-31618: Move static config to files - PLUGIN_LIST
- Update integration test;
1 parent cdb05d7 commit 59239ac

File tree

1 file changed

+11
-20
lines changed

1 file changed

+11
-20
lines changed

dev/tests/integration/testsuite/Magento/Framework/Interception/PluginListGeneratorTest.php

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -48,26 +48,17 @@ protected function setUp(): void
4848
{
4949
$this->application = Bootstrap::getInstance()->getBootstrap()->getApplication();
5050
$this->directoryList = new DirectoryList(BP, $this->getCustomDirs());
51-
$this->file = Bootstrap::getObjectManager()->create(DriverInterface::class);
52-
$reader = Bootstrap::getObjectManager()->create(
53-
// phpstan:ignore "Class Magento\Framework\ObjectManager\Config\Reader\Dom\Proxy not found."
54-
\Magento\Framework\ObjectManager\Config\Reader\Dom\Proxy::class
55-
);
56-
$scopeConfig = Bootstrap::getObjectManager()->create(\Magento\Framework\Config\Scope::class);
57-
$omConfig = Bootstrap::getObjectManager()->create(
58-
\Magento\Framework\Interception\ObjectManager\Config\Developer::class
59-
);
60-
$relations = Bootstrap::getObjectManager()->create(
61-
\Magento\Framework\ObjectManager\Relations\Runtime::class
62-
);
63-
$definitions = Bootstrap::getObjectManager()->create(
64-
\Magento\Framework\Interception\Definition\Runtime::class
65-
);
66-
$classDefinitions = Bootstrap::getObjectManager()->create(
67-
\Magento\Framework\ObjectManager\Definition\Runtime::class
68-
);
69-
// phpstan:ignore "Class Psr\Log\LoggerInterface\Proxy not found."
70-
$logger = Bootstrap::getObjectManager()->create(\Psr\Log\LoggerInterface\Proxy::class);
51+
$this->file = new \Magento\Framework\Filesystem\Driver\File();
52+
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
53+
$reader = new \Magento\Framework\ObjectManager\Config\Reader\Dom\Proxy($objectManager);
54+
$areaList = $this->createMock(\Magento\Framework\App\AreaList::class);
55+
$areaList->method('getCodes')->willReturn([]);
56+
$scopeConfig = new \Magento\Framework\Config\Scope($areaList, 'global');
57+
$omConfig = new \Magento\Framework\Interception\ObjectManager\Config\Developer();
58+
$relations = new \Magento\Framework\ObjectManager\Relations\Runtime();
59+
$definitions = new \Magento\Framework\Interception\Definition\Runtime();
60+
$classDefinitions = new \Magento\Framework\ObjectManager\Definition\Runtime();
61+
$logger = $this->createMock(\Psr\Log\LoggerInterface::class);
7162
$this->model = new PluginListGenerator(
7263
$reader,
7364
$scopeConfig,

0 commit comments

Comments
 (0)