File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments