File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
dev/tests/integration/testsuite/Magento/Customer/Model Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -69,13 +69,15 @@ public function testCRUD(): void
69
69
/**
70
70
* @magentoDataFixture Magento/Customer/_files/attribute_user_defined_customer.php
71
71
*
72
- * @expectedException \Magento\Framework\Exception\LocalizedException
73
- * @expectedExceptionMessage Do not change entity type.
74
- *
75
72
* @return void
76
73
*/
77
74
public function testAttributeSaveWithChangedEntityType (): void
78
75
{
76
+ $ this ->expectException (
77
+ \Magento \Framework \Exception \LocalizedException::class
78
+ );
79
+ $ this ->expectExceptionMessage ('Do not change entity type. ' );
80
+
79
81
$ attribute = $ this ->attributeRepository ->get ($ this ->customerEntityType , 'user_attribute ' );
80
82
$ attribute ->setEntityTypeId (5 );
81
83
$ attribute ->save ();
Original file line number Diff line number Diff line change @@ -157,12 +157,16 @@ public function testProcessCustomerValue()
157
157
* Test for processCustomerValue method with invalid value
158
158
*
159
159
* @magentoAppIsolation enabled
160
- * @expectedException \Magento\Framework\Exception\ValidatorException
160
+ *
161
161
* @throws FileSystemException
162
162
* @throws \ReflectionException
163
163
*/
164
164
public function testProcessCustomerInvalidValue ()
165
165
{
166
+ $ this ->expectException (
167
+ \Magento \Framework \Exception \ValidatorException::class
168
+ );
169
+
166
170
$ this ->mediaDirectory ->delete ('customer ' );
167
171
$ this ->mediaDirectory ->create ($ this ->mediaDirectory ->getRelativePath ('customer/tmp/ ' ));
168
172
$ tmpFilePath = $ this ->mediaDirectory ->getAbsolutePath ('customer/tmp/ ' . $ this ->fileName );
You can’t perform that action at this time.
0 commit comments