Skip to content

Commit 5ed5b22

Browse files
committed
MAGETWO-32870: [GITHUB] extra tests for current interception behavior #965
- Suppress warnings for test fixtures
1 parent 6fe0138 commit 5ed5b22

File tree

3 files changed

+81
-0
lines changed

3 files changed

+81
-0
lines changed

dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,26 +78,41 @@ public function K($param1)
7878
return '<K>' . $param1 . '</K>';
7979
}
8080

81+
/**
82+
* @SuppressWarnings(PHPMD.ShortMethodName)
83+
*/
8184
public function V($param1)
8285
{
8386
return '<V>' . $param1 . '</V>';
8487
}
8588

89+
/**
90+
* @SuppressWarnings(PHPMD.ShortMethodName)
91+
*/
8692
public function W($param1)
8793
{
8894
return '<W>' . $param1 . '</W>';
8995
}
9096

97+
/**
98+
* @SuppressWarnings(PHPMD.ShortMethodName)
99+
*/
91100
public function X($param1)
92101
{
93102
return '<X>' . $param1 . '</X>';
94103
}
95104

105+
/**
106+
* @SuppressWarnings(PHPMD.ShortMethodName)
107+
*/
96108
public function Y($param1)
97109
{
98110
return '<Y>' . $param1 . '</Y>';
99111
}
100112

113+
/**
114+
* @SuppressWarnings(PHPMD.ShortMethodName)
115+
*/
101116
public function Z($param1)
102117
{
103118
return '<Z>' . $param1 . '</Z>';

dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted/FirstPlugin.php

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,73 +14,115 @@ class FirstPlugin
1414
*/
1515
protected $_counter = 0;
1616

17+
/**
18+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
19+
*/
1720
public function aroundC(Intercepted $subject, \Closure $next, $param1)
1821
{
1922
return '<F:C>' . $next($param1) . '</F:C>';
2023
}
2124

25+
/**
26+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
27+
*/
2228
public function aroundD(Intercepted $subject, \Closure $next, $param1)
2329
{
2430
$this->_counter++;
2531
return '<F:D>' . $this->_counter . ': ' . $next($param1) . '</F:D>';
2632
}
2733

34+
/**
35+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
36+
*/
2837
public function aroundK(Intercepted $subject, \Closure $next, $param1)
2938
{
3039
$result = $subject->C($param1);
3140
return '<F:K>' . $subject->F($result) . '</F:K>';
3241
}
3342

43+
/**
44+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
45+
*/
3446
public function beforeG(Intercepted $subject, $param1)
3547
{
3648
return ['<F:bG>' . $param1 . '</F:bG>'];
3749
}
3850

51+
/**
52+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
53+
*/
3954
public function aroundG(Intercepted $subject, \Closure $next, $param1)
4055
{
4156
return $next('<F:G>' . $param1 . '</F:G>');
4257
}
4358

59+
/**
60+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
61+
*/
4462
public function afterG(Intercepted $subject, $result)
4563
{
4664
return '<F:aG>' . $result . '</F:aG>';
4765
}
4866

67+
/**
68+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
69+
*/
4970
public function beforeV(Intercepted $subject, $param1)
5071
{
5172
return ['<F:bV/>'];
5273
}
5374

75+
/**
76+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
77+
*/
5478
public function aroundV(Intercepted $subject, \Closure $next, $param1)
5579
{
5680
return '<F:V>' . $param1 . '<F:V/>';
5781
}
5882

83+
/**
84+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
85+
*/
5986
public function beforeW(Intercepted $subject, $param1)
6087
{
6188
return ['<F:bW/>'];
6289
}
6390

91+
/**
92+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
93+
*/
6494
public function aroundW(Intercepted $subject, \Closure $next, $param1)
6595
{
6696
return '<F:W>' . $param1 . '<F:W/>';
6797
}
6898

99+
/**
100+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
101+
*/
69102
public function afterW(Intercepted $subject, $result)
70103
{
71104
return '<F:aW/>';
72105
}
73106

107+
/**
108+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
109+
*/
74110
public function beforeX(Intercepted $subject, $param1)
75111
{
76112
return ['<F:bX/>'];
77113
}
78114

115+
/**
116+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
117+
*/
79118
public function aroundY(Intercepted $subject, \Closure $next, $param1)
80119
{
81120
return '<F:Y>' . $param1 . '<F:Y/>';
82121
}
83122

123+
/**
124+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
125+
*/
84126
public function afterZ(Intercepted $subject, $result)
85127
{
86128
return '<F:aZ/>';

dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted/Plugin.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,41 +65,65 @@ public function afterG(Intercepted $subject, $result)
6565
return '<P:aG>' . $result . '</P:aG>';
6666
}
6767

68+
/**
69+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
70+
*/
6871
public function beforeV(Intercepted $subject, $param1)
6972
{
7073
return ['<P:bV/>'];
7174
}
7275

76+
/**
77+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
78+
*/
7379
public function aroundV(Intercepted $subject, \Closure $next, $param1)
7480
{
7581
return '<P:V>' . $param1 . '<P:V/>';
7682
}
7783

84+
/**
85+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
86+
*/
7887
public function beforeW(Intercepted $subject, $param1)
7988
{
8089
return ['<P:bW/>'];
8190
}
8291

92+
/**
93+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
94+
*/
8395
public function aroundW(Intercepted $subject, \Closure $next, $param1)
8496
{
8597
return '<P:W>' . $param1 . '<P:W/>';
8698
}
8799

100+
/**
101+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
102+
*/
88103
public function afterW(Intercepted $subject, $result)
89104
{
90105
return '<P:aW/>';
91106
}
92107

108+
/**
109+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
110+
*/
93111
public function beforeX(Intercepted $subject, $param1)
94112
{
95113
return ['<P:bX/>'];
96114
}
97115

116+
/**
117+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
118+
*/
98119
public function aroundY(Intercepted $subject, \Closure $next, $param1)
99120
{
100121
return '<P:Y>' . $param1 . '<P:Y/>';
101122
}
102123

124+
/**
125+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
126+
*/
103127
public function afterZ(Intercepted $subject, $result)
104128
{
105129
return '<P:aZ/>';

0 commit comments

Comments
 (0)