Class GeneralTest @SuppressWarnings(PHPMD.CouplingBetweenObjects)
Definition at line 12 of file GeneralTest.php.
◆ setUp()
Definition at line 14 of file GeneralTest.php.
17 [\
Magento\Framework\Interception\Fixture\InterceptedInterface::class =>
22 \
Magento\Framework\Interception\Fixture\Intercepted\InterfacePlugin::class,
26 ], \
Magento\Framework\Interception\Fixture\Intercepted::class =>
30 'instance' => \
Magento\Framework\Interception\Fixture\Intercepted\Plugin::class,
setUpInterceptionConfig($pluginConfig)
◆ testBeforeAndAfterPluginsAreExecuted()
testBeforeAndAfterPluginsAreExecuted |
( |
| ) |
|
Definition at line 56 of file GeneralTest.php.
58 $subject = $this->_objectManager->create(\
Magento\Framework\Interception\Fixture\Intercepted::class);
60 '<IP:F><P:D>1: <D>prefix_<F><IP:C><P:C><C>test</C></P:C>' .
'</IP:C></F></D></P:D></IP:F>',
61 $subject->A(
'prefix_')->F(
'test')
◆ testChainedMethodsAreIntercepted()
testChainedMethodsAreIntercepted |
( |
| ) |
|
Definition at line 87 of file GeneralTest.php.
89 $subject = $this->_objectManager->create(\
Magento\Framework\Interception\Fixture\Intercepted::class);
90 $this->assertEquals(
'<P:D>1: <D>prefix_test</D></P:D>', $subject->A(
'prefix_')->D(
'test'));
◆ testFinalMethodWorks()
Definition at line 93 of file GeneralTest.php.
95 $subject = $this->_objectManager->create(\
Magento\Framework\Interception\Fixture\Intercepted::class);
96 $this->assertEquals(
'<P:D>1: <D>prefix_test</D></P:D>', $subject->A(
'prefix_')->D(
'test'));
97 $this->assertEquals(
'<E>prefix_final</E>', $subject->E(
'final'));
98 $this->assertEquals(
'<P:D>2: <D>prefix_test</D></P:D>', $subject->D(
'test'));
◆ testInterfacePluginsAreInherited()
testInterfacePluginsAreInherited |
( |
| ) |
|
Definition at line 75 of file GeneralTest.php.
77 $subject = $this->_objectManager->create(\
Magento\Framework\Interception\Fixture\Intercepted::class);
78 $this->assertEquals(
'<IP:C><P:C><C>test</C></P:C></IP:C>', $subject->C(
'test'));
◆ testInternalMethodCallsAreIntercepted()
testInternalMethodCallsAreIntercepted |
( |
| ) |
|
Definition at line 81 of file GeneralTest.php.
83 $subject = $this->_objectManager->create(\
Magento\Framework\Interception\Fixture\Intercepted::class);
84 $this->assertEquals(
'<B>12<IP:C><P:C><C>1</C></P:C></IP:C></B>', $subject->B(
'1',
'2'));
◆ testMethodCanBePluginized()
testMethodCanBePluginized |
( |
| ) |
|
Definition at line 41 of file GeneralTest.php.
43 $subject = $this->_objectManager->create(\
Magento\Framework\Interception\Fixture\Intercepted::class);
44 $this->assertEquals(
'<P:D>1: <D>test</D></P:D>', $subject->D(
'test'));
◆ testObjectKeepsStateBetweenInvocations()
testObjectKeepsStateBetweenInvocations |
( |
| ) |
|
Definition at line 101 of file GeneralTest.php.
103 $subject = $this->_objectManager->create(\
Magento\Framework\Interception\Fixture\Intercepted::class);
104 $this->assertEquals(
'<P:D>1: <D>test</D></P:D>', $subject->D(
'test'));
105 $this->assertEquals(
'<P:D>2: <D>test</D></P:D>', $subject->D(
'test'));
◆ testPluginCallsOtherMethodsOnSubject()
testPluginCallsOtherMethodsOnSubject |
( |
| ) |
|
Definition at line 65 of file GeneralTest.php.
67 $subject = $this->_objectManager->create(\
Magento\Framework\Interception\Fixture\Intercepted::class);
69 '<P:K><IP:F><P:D>1: <D>prefix_<F><IP:C><P:C><C><IP:C><P:C><C>test' .
70 '</C></P:C></IP:C></C></P:C></IP:C></F></D></P:D></IP:F></P:K>',
71 $subject->A(
'prefix_')->K(
'test')
◆ testPluginCanCallOnlyNextMethodOnNext()
testPluginCanCallOnlyNextMethodOnNext |
( |
| ) |
|
Definition at line 47 of file GeneralTest.php.
49 $subject = $this->_objectManager->create(\
Magento\Framework\Interception\Fixture\Intercepted::class);
51 '<IP:aG><P:aG><G><P:G><P:bG><IP:G><IP:bG>test</IP:bG></IP:G></P:bG></P:G></G></P:aG></IP:aG>',
The documentation for this class was generated from the following file:
- vendor/magento/magento2-base/dev/tests/integration/testsuite/Magento/Framework/Interception/GeneralTest.php