Code Duplication    Length = 25-25 lines in 2 locations

eZ/Publish/Core/Persistence/Legacy/Tests/Content/UrlAlias/UrlAliasHandlerTest.php 2 locations

@@ 1919-1943 (lines=25) @@
1916
     * @group create
1917
     * @group custom
1918
     */
1919
    public function testCreateCustomUrlAliasBehaviour()
1920
    {
1921
        $handlerMock = $this->getPartlyMockedHandler(array('createUrlAlias'));
1922
1923
        $handlerMock->expects(
1924
            $this->once()
1925
        )->method(
1926
            'createUrlAlias'
1927
        )->with(
1928
            $this->equalTo('eznode:1'),
1929
            $this->equalTo('path'),
1930
            $this->equalTo(false),
1931
            $this->equalTo(null),
1932
            $this->equalTo(false)
1933
        )->will(
1934
            $this->returnValue(
1935
                new UrlAlias()
1936
            )
1937
        );
1938
1939
        $this->assertInstanceOf(
1940
            UrlAlias::class,
1941
            $handlerMock->createCustomUrlAlias(1, 'path')
1942
        );
1943
    }
1944
1945
    /**
1946
     * Test for the createGlobalUrlAlias() method.
@@ 1952-1976 (lines=25) @@
1949
     * @group create
1950
     * @group global
1951
     */
1952
    public function testCreateGlobalUrlAliasBehaviour()
1953
    {
1954
        $handlerMock = $this->getPartlyMockedHandler(array('createUrlAlias'));
1955
1956
        $handlerMock->expects(
1957
            $this->once()
1958
        )->method(
1959
            'createUrlAlias'
1960
        )->with(
1961
            $this->equalTo('module/module'),
1962
            $this->equalTo('path'),
1963
            $this->equalTo(false),
1964
            $this->equalTo(null),
1965
            $this->equalTo(false)
1966
        )->will(
1967
            $this->returnValue(
1968
                new UrlAlias()
1969
            )
1970
        );
1971
1972
        $this->assertInstanceOf(
1973
            UrlAlias::class,
1974
            $handlerMock->createGlobalUrlAlias('module/module', 'path')
1975
        );
1976
    }
1977
1978
    /**
1979
     * Test for the createUrlAlias() method.