Code Duplication    Length = 25-25 lines in 2 locations

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

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