tests/unit/Utils/UrlKeyUtilTest.php
/**
     * Test if makeUnique() method returns the same key if the product exits and already has the same key.
     *
     * @return void
     * @see case-01-02
     */
Test if makeUnique() method returns the same key if the product exits and already has the same key.
@return void
@see case-01-02
Test if makeUnique () method returns the same key if the product exits and already has the same key . @return void @see case - 01 - 02
public function testMakeUniqueWithSameKeyAndStoreAndEntity() : void
    {
        $mockSubject = $this->getMockSubject();
        $entity = array(MemberNames::ENTITY_ID => 1234);
        $this->assertSame(
            'joust-duffle-bag',
            $this->getMockUrlKeyUtil()->makeUnique($mockSubject, $entity, 'joust-duffle-bag')
        );
    }
public function testMakeUniqueWithSameKeyAndStoreAndEntity ( ) : void { $ mockSubject = $ this -> getMockSubject ( ) ; $ entity = array ( MemberNames :: ENTITY_ID => 1234 ) ; $ this -> assertSame ( 'joust-duffle-bag' , $ this -> getMockUrlKeyUtil ( ) -> makeUnique ( $ mockSubject , $ entity , 'joust-duffle-bag' ) ) ; }
Test if makeUnique() method returns the same key if the product exits and already has the same key.
Test if makeUnique () method returns the same key if the product exits and already has the same key .
// load the mock subject instance // initialize the entity // assert the unique URL key