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 testGetAttributSetByAttributSetNameWithInvalidEntityTypeCode()
    {
        $this->expectException(\Exception::class);
        $this->expectExceptionMessage('Found invalid entity type code "unknown_entity_type"');
        $this->abstractEavSubject->expects($this->any())->method('getEntityTypeCode')->willReturn('unknown_entity_type');
        $this->abstractEavSubject->getAttributeSetByAttributeSetName('Default');
    }
public function testGetAttributSetByAttributSetNameWithInvalidEntityTypeCode ( ) { $ this -> expectException ( \ Exception :: class ) ; $ this -> expectExceptionMessage ( 'Found invalid entity type code "unknown_entity_type"' ) ; $ this -> abstractEavSubject -> expects ( $ this -> any ( ) ) -> method ( 'getEntityTypeCode' ) -> willReturn ( 'unknown_entity_type' ) ; $ this -> abstractEavSubject -> getAttributeSetByAttributeSetName ( 'Default' ) ; }
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 for an invalid entity type code