File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
dev/tests/api-functional/testsuite/Magento/Customer/Api Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 9
9
use Magento \Customer \Api \Data \CustomerInterface as Customer ;
10
10
use Magento \Customer \Model \Data \AttributeMetadata ;
11
11
use Magento \TestFramework \TestCase \WebapiAbstract ;
12
+ use Magento \TestFramework \Helper \Bootstrap ;
12
13
13
14
/**
14
15
* Class CustomerMetadataTest
@@ -19,6 +20,19 @@ class CustomerMetadataTest extends WebapiAbstract
19
20
const SERVICE_VERSION = "V1 " ;
20
21
const RESOURCE_PATH = "/V1/attributeMetadata/customer " ;
21
22
23
+ /**
24
+ * @var CustomerMetadataInterface
25
+ */
26
+ private $ customerMetadata ;
27
+
28
+ /**
29
+ * Execute per test initialization.
30
+ */
31
+ public function setUp ()
32
+ {
33
+ $ this ->customerMetadata = Bootstrap::getObjectManager ()->create (CustomerMetadataInterface::class);
34
+ }
35
+
22
36
/**
23
37
* Test retrieval of attribute metadata for the customer entity type.
24
38
*
@@ -200,8 +214,7 @@ public function testGetCustomAttributesMetadata()
200
214
201
215
$ attributeMetadata = $ this ->_webApiCall ($ serviceInfo );
202
216
203
- // There are no default custom attributes.
204
- $ this ->assertCount (0 , $ attributeMetadata );
217
+ $ this ->assertCount (count ($ this ->customerMetadata ->getCustomAttributesMetadata ()), $ attributeMetadata );
205
218
}
206
219
207
220
/**
You can’t perform that action at this time.
0 commit comments