tests/unit/Utils/UrlKeyUtilTest.php
/**
     * Test if makeUnique() method returns the same key, multipath and store but a different entity.
     *
     * @return void
     */
Test if makeUnique() method returns the same key, multipath and store but a different entity.
@return void
Test if makeUnique () method returns the same key multipath and store but a different entity . @return void
public function testMakeUniqueWithMultipleInvocationsSameKeyAndMultipathAndStoreButDifferentEntity() : void
    {
        $urlKeyUtil = $this->getMockUrlKeyUtil();
        $mockSubject = $this->getMockSubject(1237);
        $entity = array(MemberNames::ENTITY_ID => 1237);
        $this->assertSame(
            'duffle-bags',
            $urlKeyUtil->makeUnique($mockSubject, $entity, 'duffle-bags', array('gear/bags'))
        );
        $mockSubject = $this->getMockSubject(8321);
        $entity = array(MemberNames::ENTITY_ID => 8321);
        $this->assertSame(
            'duffle-bags-1',
            $urlKeyUtil->makeUnique($mockSubject, $entity, 'duffle-bags', array('gear/bags'))
        );
        $mockSubject = $this->getMockSubject(8322);
        $entity = array(MemberNames::ENTITY_ID => 8322);
        $this->assertSame(
            'duffle-bags-2',
            $urlKeyUtil->makeUnique($mockSubject, $entity, 'duffle-bags', array('gear/bags'))
        );
    }
public function testMakeUniqueWithMultipleInvocationsSameKeyAndMultipathAndStoreButDifferentEntity ( ) : void { $ urlKeyUtil = $ this -> getMockUrlKeyUtil ( ) ; $ mockSubject = $ this -> getMockSubject ( 1237 ) ; $ entity = array ( MemberNames :: ENTITY_ID => 1237 ) ; $ this -> assertSame ( 'duffle-bags' , $ urlKeyUtil -> makeUnique ( $ mockSubject , $ entity , 'duffle-bags' , array ( 'gear/bags' ) ) ) ; $ mockSubject = $ this -> getMockSubject ( 8321 ) ; $ entity = array ( MemberNames :: ENTITY_ID => 8321 ) ; $ this -> assertSame ( 'duffle-bags-1' , $ urlKeyUtil -> makeUnique ( $ mockSubject , $ entity , 'duffle-bags' , array ( 'gear/bags' ) ) ) ; $ mockSubject = $ this -> getMockSubject ( 8322 ) ; $ entity = array ( MemberNames :: ENTITY_ID => 8322 ) ; $ this -> assertSame ( 'duffle-bags-2' , $ urlKeyUtil -> makeUnique ( $ mockSubject , $ entity , 'duffle-bags' , array ( 'gear/bags' ) ) ) ; }
Test if makeUnique() method returns the same key, multipath and store but a different entity.
Test if makeUnique () method returns the same key multipath and store but a different entity .
// load the URL key utility we want to test // load the mock subject instance // initialize the entity // assert the unique URL key // load the mock subject instance // initialize the entity // assert the unique URL key // load the mock subject instance // initialize the entity // assert the unique URL key