Definition at line 15 of file RedirectTest.php.
◆ httpRedirectResponseStatusCodes()
httpRedirectResponseStatusCodes |
( |
| ) |
|
◆ setUp()
Definition at line 32 of file RedirectTest.php.
34 $this->redirectInterface = $this->createMock(RedirectInterface::class);
35 $this->urlBuilder = $this->createMock(UrlInterface::class);
36 $this->urlInterface = $this->createMock(UrlInterface::class);
37 $this->response = $this->createMock(HttpResponseInterface::class);
38 $this->redirect =
new Redirect($this->redirectInterface, $this->urlInterface);
◆ testRender()
testRender |
( |
|
$expectedStatusCode, |
|
|
|
$actualStatusCode |
|
) |
| |
- Parameters
-
int | $expectedStatusCode | |
int | null | $actualStatusCode | @dataProvider httpRedirectResponseStatusCodes |
Definition at line 95 of file RedirectTest.php.
97 $url =
'http://test.com';
98 $this->redirect->setUrl(
$url);
99 $this->redirect->setHttpResponseCode($actualStatusCode);
102 ->expects($this->once())
103 ->method(
'setRedirect')
104 ->with(
$url, $expectedStatusCode);
106 $this->redirect->renderResult($this->response);
◆ testSetPath()
Definition at line 65 of file RedirectTest.php.
68 $params = [
'one' => 1,
'two' => 2];
69 $this->redirectInterface->expects($this->once())->method(
'updatePathParams')->with(
$params)->will(
72 $this->assertInstanceOf(
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
◆ testSetRefererOrBaseUrl()
testSetRefererOrBaseUrl |
( |
| ) |
|
Definition at line 50 of file RedirectTest.php.
52 $this->redirectInterface->expects($this->once())->method(
'getRedirectUrl');
53 $this->assertInstanceOf(
55 $this->redirect->setRefererOrBaseUrl()
◆ testSetRefererUrl()
Definition at line 41 of file RedirectTest.php.
43 $this->redirectInterface->expects($this->once())->method(
'getRefererUrl');
44 $this->assertInstanceOf(
46 $this->redirect->setRefererUrl()
◆ testSetUrl()
Definition at line 59 of file RedirectTest.php.
61 $url =
'http://test.com';
62 $this->assertInstanceOf(Redirect::class, $this->redirect->setUrl(
$url));
◆ $redirect
◆ $redirectInterface
◆ $response
◆ $urlBuilder
◆ $urlInterface
The documentation for this class was generated from the following file: