File tree Expand file tree Collapse file tree 2 files changed +4
-26
lines changed
dev/tests/integration/testsuite/Magento/Customer/Model Expand file tree Collapse file tree 2 files changed +4
-26
lines changed Original file line number Diff line number Diff line change @@ -31,18 +31,7 @@ protected function setUp()
31
31
public function testGetCustomAttributesMetadata ()
32
32
{
33
33
$ customAttributesMetadata = $ this ->_service ->getCustomAttributesMetadata ();
34
- $ this ->assertCount (2 , $ customAttributesMetadata , "Invalid number of attributes returned. " );
35
- $ configAttributeCode = 'address_attribute_1 ' ;
36
- $ configAttributeFound = false ;
37
- foreach ($ customAttributesMetadata as $ attribute ) {
38
- if ($ attribute ->getAttributeCode () == $ configAttributeCode ) {
39
- $ configAttributeFound = true ;
40
- break ;
41
- }
42
- }
43
- if (!$ configAttributeFound ) {
44
- $ this ->fail ("Custom attribute declared in the config not found. " );
45
- }
34
+ $ this ->assertCount (0 , $ customAttributesMetadata , "Invalid number of attributes returned. " );
46
35
}
47
36
48
37
/**
@@ -69,7 +58,7 @@ public function testGetCustomAttributesMetadataWithAttributeNamedCustomAttribute
69
58
if (!$ customAttributesFound ) {
70
59
$ this ->fail ("Custom attributes declared in the config not found. " );
71
60
}
72
- $ this ->assertCount (4 , $ customAttributesMetadata , "Invalid number of attributes returned. " );
61
+ $ this ->assertCount (2 , $ customAttributesMetadata , "Invalid number of attributes returned. " );
73
62
}
74
63
75
64
public function testGetAddressAttributeMetadata ()
Original file line number Diff line number Diff line change @@ -47,18 +47,7 @@ protected function setUp()
47
47
public function testGetCustomAttributesMetadata ()
48
48
{
49
49
$ customAttributesMetadata = $ this ->_service ->getCustomAttributesMetadata ();
50
- $ this ->assertCount (3 , $ customAttributesMetadata , "Invalid number of attributes returned. " );
51
- $ configAttributeCode = 'customer_attribute_1 ' ;
52
- $ configAttributeFound = false ;
53
- foreach ($ customAttributesMetadata as $ attribute ) {
54
- if ($ attribute ->getAttributeCode () == $ configAttributeCode ) {
55
- $ configAttributeFound = true ;
56
- break ;
57
- }
58
- }
59
- if (!$ configAttributeFound ) {
60
- $ this ->fail ("Custom attribute declared in the config not found. " );
61
- }
50
+ $ this ->assertCount (1 , $ customAttributesMetadata , "Invalid number of attributes returned. " );
62
51
}
63
52
64
53
public function testGetNestedOptionsCustomAttributesMetadata ()
@@ -104,7 +93,7 @@ public function testGetCustomAttributesMetadataWithAttributeNamedCustomAttribute
104
93
if (!$ customAttributesFound ) {
105
94
$ this ->fail ("Custom attributes declared in the config not found. " );
106
95
}
107
- $ this ->assertCount (5 , $ customAttributesMetadata , "Invalid number of attributes returned. " );
96
+ $ this ->assertCount (3 , $ customAttributesMetadata , "Invalid number of attributes returned. " );
108
97
}
109
98
110
99
/**
You can’t perform that action at this time.
0 commit comments