Code Duplication    Length = 25-25 lines in 2 locations

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

@@ 1899-1923 (lines=25) @@
1896
     * @group create
1897
     * @group custom
1898
     */
1899
    public function testCreateCustomUrlAliasBehaviour()
1900
    {
1901
        $handlerMock = $this->getPartlyMockedHandler(array('createUrlAlias'));
1902
1903
        $handlerMock->expects(
1904
            $this->once()
1905
        )->method(
1906
            'createUrlAlias'
1907
        )->with(
1908
            $this->equalTo('eznode:1'),
1909
            $this->equalTo('path'),
1910
            $this->equalTo(false),
1911
            $this->equalTo(null),
1912
            $this->equalTo(false)
1913
        )->will(
1914
            $this->returnValue(
1915
                new UrlAlias()
1916
            )
1917
        );
1918
1919
        $this->assertInstanceOf(
1920
            'eZ\\Publish\\SPI\\Persistence\\Content\\UrlAlias',
1921
            $handlerMock->createCustomUrlAlias(1, 'path')
1922
        );
1923
    }
1924
1925
    /**
1926
     * Test for the createGlobalUrlAlias() method.
@@ 1932-1956 (lines=25) @@
1929
     * @group create
1930
     * @group global
1931
     */
1932
    public function testCreateGlobalUrlAliasBehaviour()
1933
    {
1934
        $handlerMock = $this->getPartlyMockedHandler(array('createUrlAlias'));
1935
1936
        $handlerMock->expects(
1937
            $this->once()
1938
        )->method(
1939
            'createUrlAlias'
1940
        )->with(
1941
            $this->equalTo('module/module'),
1942
            $this->equalTo('path'),
1943
            $this->equalTo(false),
1944
            $this->equalTo(null),
1945
            $this->equalTo(false)
1946
        )->will(
1947
            $this->returnValue(
1948
                new UrlAlias()
1949
            )
1950
        );
1951
1952
        $this->assertInstanceOf(
1953
            'eZ\\Publish\\SPI\\Persistence\\Content\\UrlAlias',
1954
            $handlerMock->createGlobalUrlAlias('module/module', 'path')
1955
        );
1956
    }
1957
1958
    /**
1959
     * Test for the createUrlAlias() method.