Code Duplication    Length = 25-25 lines in 2 locations

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

@@ 1987-2011 (lines=25) @@
1984
     * @group create
1985
     * @group custom
1986
     */
1987
    public function testCreateCustomUrlAliasBehaviour()
1988
    {
1989
        $handlerMock = $this->getPartlyMockedHandler(array('createUrlAlias'));
1990
1991
        $handlerMock->expects(
1992
            $this->once()
1993
        )->method(
1994
            'createUrlAlias'
1995
        )->with(
1996
            $this->equalTo('eznode:1'),
1997
            $this->equalTo('path'),
1998
            $this->equalTo(false),
1999
            $this->equalTo(null),
2000
            $this->equalTo(false)
2001
        )->will(
2002
            $this->returnValue(
2003
                new UrlAlias()
2004
            )
2005
        );
2006
2007
        $this->assertInstanceOf(
2008
            'eZ\\Publish\\SPI\\Persistence\\Content\\UrlAlias',
2009
            $handlerMock->createCustomUrlAlias(1, 'path')
2010
        );
2011
    }
2012
2013
    /**
2014
     * Test for the createGlobalUrlAlias() method.
@@ 2020-2044 (lines=25) @@
2017
     * @group create
2018
     * @group global
2019
     */
2020
    public function testCreateGlobalUrlAliasBehaviour()
2021
    {
2022
        $handlerMock = $this->getPartlyMockedHandler(array('createUrlAlias'));
2023
2024
        $handlerMock->expects(
2025
            $this->once()
2026
        )->method(
2027
            'createUrlAlias'
2028
        )->with(
2029
            $this->equalTo('module/module'),
2030
            $this->equalTo('path'),
2031
            $this->equalTo(false),
2032
            $this->equalTo(null),
2033
            $this->equalTo(false)
2034
        )->will(
2035
            $this->returnValue(
2036
                new UrlAlias()
2037
            )
2038
        );
2039
2040
        $this->assertInstanceOf(
2041
            'eZ\\Publish\\SPI\\Persistence\\Content\\UrlAlias',
2042
            $handlerMock->createGlobalUrlAlias('module/module', 'path')
2043
        );
2044
    }
2045
2046
    /**
2047
     * Test for the createUrlAlias() method.