Skip to content

Commit 4a4da57

Browse files
committed
Issue #16 Test for use of notifyUrl.
1 parent 56e1cec commit 4a4da57

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/Message/SIMAuthorizeRequestTest.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,21 @@ public function testSend()
6565
$redirectData = $response->getRedirectData();
6666
$this->assertSame('https://www.example.com/return', $redirectData['x_relay_url']);
6767
}
68+
69+
// Issue #16 Support notifyUrl.
70+
public function testSendNoifyUrl()
71+
{
72+
$this->request->setReturnUrl(null);
73+
$this->request->setNotifyUrl('https://www.example.com/return');
74+
75+
$response = $this->request->send();
76+
77+
$this->assertFalse($response->isSuccessful());
78+
$this->assertTrue($response->isRedirect());
79+
$this->assertNotEmpty($response->getRedirectUrl());
80+
$this->assertSame('POST', $response->getRedirectMethod());
81+
82+
$redirectData = $response->getRedirectData();
83+
$this->assertSame('https://www.example.com/return', $redirectData['x_relay_url']);
84+
}
6885
}

0 commit comments

Comments
 (0)