File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
dev/tests/integration/testsuite/Magento/Customer/Model Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class AttributeTest extends \PHPUnit\Framework\TestCase
41
41
/**
42
42
* @inheritDoc
43
43
*/
44
- protected function setUp ()
44
+ protected function setUp () : void
45
45
{
46
46
$ this ->objectManager = Bootstrap::getObjectManager ();
47
47
$ this ->model = $ this ->objectManager ->get (Attribute::class);
@@ -69,13 +69,12 @@ 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 (\Magento \Framework \Exception \LocalizedException::class);
77
+ $ this ->expectExceptionMessage ('Do not change entity type. ' );
79
78
$ attribute = $ this ->attributeRepository ->get ($ this ->customerEntityType , 'user_attribute ' );
80
79
$ attribute ->setEntityTypeId (5 );
81
80
$ attribute ->save ();
You can’t perform that action at this time.
0 commit comments