tests/unit/Subjects/AbstractEavSubjectTest.php
/**
     * Test the getAttributeSetByAttributeSetName() method.
     *
     * @return void
     */
Test the getAttributeSetByAttributeSetName() method.
@return void
Test the getAttributeSetByAttributeSetName () method . @return void
public function testGetAttributSetByAttributeSetName()
    {
        $attributeSet = array(
            MemberNames::ATTRIBUTE_SET_ID => 4,
            MemberNames::ENTITY_TYPE_ID => 4,
            MemberNames::ATTRIBUTE_SET_NAME => $attributeSetName = 'Default'
        );
        $this->abstractEavSubject->expects($this->any())
            ->method('getEntityTypeCode')
            ->willReturn(EntityTypeCodes::CATALOG_PRODUCT);
        $this->assertSame(
            $attributeSet,
            $this->abstractEavSubject->getAttributeSetByAttributeSetName($attributeSetName)
        );
    }
public function testGetAttributSetByAttributeSetName ( ) { $ attributeSet = array ( MemberNames :: ATTRIBUTE_SET_ID => 4 , MemberNames :: ENTITY_TYPE_ID => 4 , MemberNames :: ATTRIBUTE_SET_NAME => $ attributeSetName = 'Default' ) ; $ this -> abstractEavSubject -> expects ( $ this -> any ( ) ) -> method ( 'getEntityTypeCode' ) -> willReturn ( EntityTypeCodes :: CATALOG_PRODUCT ) ; $ this -> assertSame ( $ attributeSet , $ this -> abstractEavSubject -> getAttributeSetByAttributeSetName ( $ attributeSetName ) ) ; }
Test the getAttributeSetByAttributeSetName() method.
Test the getAttributeSetByAttributeSetName () method .
// initialize the exptected attribute set // mock the method to return the entity type code // laod and count the attributes