/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
dev/tests/integration/testsuite/Magento/Framework/Interception/TwoPluginTest.php
62 строки
2 KB
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 10:44
22 окт 2025, 10:44
264bea2
Код
Авторство
О чём код?
<?php /** * Copyright 2015 Adobe * All Rights Reserved. */ namespace Magento\Framework\Interception; /** * Class TwoPluginTest */ class TwoPluginTest extends AbstractPlugin { protected function setUp(): void { $this->setUpInterceptionConfig( [\Magento\Framework\Interception\Fixture\Intercepted::class => [ 'plugins' => [ 'first' => [ 'instance' => \Magento\Framework\Interception\Fixture\Intercepted\FirstPlugin::class, 'sortOrder' => 10, ], 'second' => [ 'instance' => \Magento\Framework\Interception\Fixture\Intercepted\Plugin::class, 'sortOrder' => 20, ] ], ] ] ); parent::setUp(); } public function testPluginBeforeWins() { $subject = $this->_objectManager->create(\Magento\Framework\Interception\Fixture\Intercepted::class); $this->assertEquals('<X><P:bX/></X>', $subject->X('test')); } public function testPluginAroundWins() { $subject = $this->_objectManager->create(\Magento\Framework\Interception\Fixture\Intercepted::class); $this->assertEquals('<F:Y>test<F:Y/>', $subject->Y('test')); } public function testPluginAfterWins() { $subject = $this->_objectManager->create(\Magento\Framework\Interception\Fixture\Intercepted::class); $this->assertEquals('<P:aZ/>', $subject->Z('test')); } public function testPluginBeforeAroundWins() { $subject = $this->_objectManager->create(\Magento\Framework\Interception\Fixture\Intercepted::class); $this->assertEquals('<F:V><F:bV/><F:V/>', $subject->V('test')); } public function testPluginBeforeAroundAfterWins() { $subject = $this->_objectManager->create(\Magento\Framework\Interception\Fixture\Intercepted::class); $this->assertEquals('<F:aW/>', $subject->W('test')); } }