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