Skip to content

Commit

Permalink
Added app isolation attribute to tests in EavSetupTest
Browse files Browse the repository at this point in the history
because the affect global state (adding error messages to the `Magento\Eav\Model\Validator\Attribute\Code` service) which will affect further tests that try to add eav attributes.

This change fixes magento#39616.
  • Loading branch information
stollr committed Feb 11, 2025
1 parent d253a44 commit b3c98cd
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

namespace Magento\Eav\Setup;

use Magento\TestFramework\Fixture\AppIsolation;

/**
* Test class for Magento\Eav\Setup\EavSetup.
* @magentoDbIsolation enabled
Expand Down Expand Up @@ -66,6 +68,7 @@ public static function addAttributeDataProvider()
*
* @dataProvider addAttributeThrowExceptionDataProvider
*/
#[AppIsolation(true)]
public function testAddAttributeThrowException($attributeCode)
{
$this->expectException(\Magento\Framework\Exception\LocalizedException::class);
Expand Down Expand Up @@ -98,6 +101,7 @@ public static function addAttributeThrowExceptionDataProvider()
*
* @dataProvider addInvalidAttributeThrowExceptionDataProvider
*/
#[AppIsolation(true)]
public function testAddInvalidAttributeThrowException($attributeCode)
{
$this->expectException(\Magento\Framework\Exception\LocalizedException::class);
Expand Down

0 comments on commit b3c98cd

Please sign in to comment.