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