File tree Expand file tree Collapse file tree 4 files changed +9
-7
lines changed
app/code/Magento/Theme/Test/Unit/Model/Design/Backend
dev/tests/integration/testsuite/Magento
Catalog/Model/ResourceModel/Eav Expand file tree Collapse file tree 4 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ public function setUp(): void
70
70
/**
71
71
* @inheritdoc
72
72
*/
73
- public function tearDown ()
73
+ public function tearDown (): void
74
74
{
75
75
unset($ this ->imageBackend );
76
76
}
Original file line number Diff line number Diff line change @@ -67,13 +67,15 @@ public function testCRUD()
67
67
/**
68
68
* @magentoDataFixture Magento/Catalog/_files/product_attribute.php
69
69
*
70
- * @expectedException \Magento\Framework\Exception\LocalizedException
71
- * @expectedExceptionMessage Do not change entity type.
72
- *
73
70
* @return void
74
71
*/
75
72
public function testAttributeSaveWithChangedEntityType (): void
76
73
{
74
+ $ this ->expectException (
75
+ \Magento \Framework \Exception \LocalizedException::class
76
+ );
77
+ $ this ->expectExceptionMessage ('Do not change entity type. ' );
78
+
77
79
$ attribute = $ this ->attributeRepository ->get ($ this ->catalogProductEntityType , 'test_attribute_code_333 ' );
78
80
$ attribute ->setEntityTypeId (1 );
79
81
$ attribute ->save ();
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);
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ class ImageTest extends \PHPUnit\Framework\TestCase
55
55
/**
56
56
* @inheritDoc
57
57
*/
58
- public function setUp ()
58
+ public function setUp (): void
59
59
{
60
60
$ this ->objectManager = Bootstrap::getObjectManager ();
61
61
$ this ->filesystem = $ this ->objectManager ->get (Filesystem::class);
@@ -199,7 +199,7 @@ public function testProcessCustomerInvalidValue()
199
199
* @inheritdoc
200
200
* @throws FileSystemException
201
201
*/
202
- public static function tearDownAfterClass ()
202
+ public static function tearDownAfterClass (): void
203
203
{
204
204
parent ::tearDownAfterClass ();
205
205
$ filesystem = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ()->get (
You can’t perform that action at this time.
0 commit comments