Skip to content

Commit 1c6e4d6

Browse files
committed
Issue thephpleague#16 Further test for DPM.
1 parent 4a4da57 commit 1c6e4d6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/Message/DPMAuthorizeRequestTest.php

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

0 commit comments

Comments
 (0)