Code Duplication    Length = 25-25 lines in 2 locations

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

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