tests/unit/Subjects/AbstractEavSubjectTest.php
/**
     * Test the getAttributeSetByAttributeSetName() method with an invalid attribute set name.
     *
     * @return void
     */
Test the getAttributeSetByAttributeSetName() method with an invalid attribute set name.
@return void
Test the getAttributeSetByAttributeSetName () method with an invalid attribute set name . @return void
public function testGetAttributSetByAttributSetNameWithInvalidAttributeSetName()
    {
        $this->expectException(\Exception::class);
        $this->expectExceptionMessage('Found invalid attribute set name "Unknown"');
        $this->abstractEavSubject->expects($this->any())
            ->method('getEntityTypeCode')
            ->willReturn(EntityTypeCodes::CATALOG_PRODUCT);
        $this->abstractEavSubject->getAttributeSetByAttributeSetName('Unknown');
    }
public function testGetAttributSetByAttributSetNameWithInvalidAttributeSetName ( ) { $ this -> expectException ( \ Exception :: class ) ; $ this -> expectExceptionMessage ( 'Found invalid attribute set name "Unknown"' ) ; $ this -> abstractEavSubject -> expects ( $ this -> any ( ) ) -> method ( 'getEntityTypeCode' ) -> willReturn ( EntityTypeCodes :: CATALOG_PRODUCT ) ; $ this -> abstractEavSubject -> getAttributeSetByAttributeSetName ( 'Unknown' ) ; }
Test the getAttributeSetByAttributeSetName() method with an invalid attribute set name.
Test the getAttributeSetByAttributeSetName () method with an invalid attribute set name .
// mock the method to return the entity type code // try to load the attribute set with the invalid name