File tree 1 file changed +25
-0
lines changed
dev/tests/integration/testsuite/Magento/Customer/Block/Form 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,31 @@ public function testFaxEnabled(): void
138
138
$ this ->assertContains ('title="Fax" ' , $ block ->toHtml ());
139
139
}
140
140
141
+ /**
142
+ * @magentoAppIsolation enabled
143
+ * @magentoDbIsolation enabled
144
+ * @return void
145
+ */
146
+ public function testTelephoneWithStoreLabel (): void
147
+ {
148
+ /** @var \Magento\Customer\Model\Attribute $model */
149
+ $ model = Bootstrap::getObjectManager ()->create (
150
+ \Magento \Customer \Model \Attribute::class
151
+ );
152
+ $ model ->loadByCode ('customer_address ' , 'telephone ' )->setIsVisible ('1 ' )->setStoreLabel ('Telephone2 ' );
153
+ $ model ->save ();
154
+
155
+ /** @var \Magento\Customer\Block\Form\Register $block */
156
+ $ block = Bootstrap::getObjectManager ()->create (
157
+ Register::class
158
+ )->setTemplate ('Magento_Customer::form/register.phtml ' )
159
+ ->setShowAddressFields (true );
160
+ $ this ->setAttributeDataProvider ($ block );
161
+
162
+ $ this ->assertNotContains ('title="Phone Number" ' , $ block ->toHtml ());
163
+ $ this ->assertContains ('title="Telephone2" ' , $ block ->toHtml ());
164
+ }
165
+
141
166
/**
142
167
* @inheritdoc
143
168
*/
You can’t perform that action at this time.
0 commit comments