@@ -20,8 +20,10 @@ public function testGettersSetters($className = null, $variables = null)
20
20
foreach ($ variables as $ variableName => $ variableValue ) {
21
21
$ setterName = 'set ' . $ variableName ;
22
22
23
- $ this ->assertTrue (method_exists ($ classObject , $ setterName ),
24
- "Method " . $ setterName . " does not exist in " . $ className );
23
+ $ this ->assertTrue (
24
+ method_exists ($ classObject , $ setterName ),
25
+ "Method " . $ setterName . " does not exist in " . $ className
26
+ );
25
27
26
28
if (is_array ($ variableValue )) {
27
29
if (strpos ($ variableValue [0 ], 'Magento ' ) !== false ) {
@@ -34,25 +36,34 @@ public function testGettersSetters($className = null, $variables = null)
34
36
$ variableValue = $ obj ;
35
37
$ variables [$ variableName ] = $ variableValue ;
36
38
}
37
- $ this ->assertNotFalse (call_user_func ([$ classObject , $ setterName ], $ variableValue ),
38
- "Calling method " . $ setterName . " failed in " . $ className );
39
+ $ this ->assertNotFalse (call_user_func (
40
+ [$ classObject , $ setterName ], $ variableValue ),
41
+ "Calling method " . $ setterName . " failed in " . $ className
42
+ );
39
43
}
40
44
41
45
foreach ($ variables as $ variableName => $ variableValue ) {
42
46
$ getterName = 'get ' . $ variableName ;
43
47
44
- $ this ->assertTrue (method_exists ($ classObject , $ getterName ),
45
- "Method " . $ getterName . " does not exist in " . $ className );
48
+ $ this ->assertTrue (
49
+ method_exists ($ classObject , $ getterName ),
50
+ "Method " . $ getterName . " does not exist in " . $ className
51
+ );
46
52
$ result = call_user_func ([$ classObject , $ getterName ]);
47
- $ this ->assertNotFalse ($ result ,
48
- "Calling method " . $ getterName . " failed in " . $ className );
49
- $ this ->assertSame ($ result , $ variableValue ,
50
- "Value from " . $ getterName . "did not match in " . $ className );
53
+ $ this ->assertNotFalse (
54
+ $ result ,
55
+ "Calling method " . $ getterName . " failed in " . $ className
56
+ );
57
+ $ this ->assertSame (
58
+ $ result , $ variableValue ,
59
+ "Value from " . $ getterName . "did not match in " . $ className
60
+ );
51
61
}
52
62
}
53
63
54
64
/**
55
65
* @return array
66
+ * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
56
67
*/
57
68
public function dataProviderGettersSetters ()
58
69
{
0 commit comments