mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2026-07-17 16:39:40 +00:00
Use a string statusCode in the YourlsProxy test
YOURLS returns the status code as a string (see #1844); mirror that in the regression test so it stays correct if the comparison ever changes.
This commit is contained in:
parent
a0c0d154ee
commit
bb8b77d714
1 changed files with 3 additions and 2 deletions
|
|
@ -139,8 +139,9 @@ class YourlsProxyTest extends TestCase
|
|||
{
|
||||
// YOURLS may reply with statusCode 200 but without a shorturl field;
|
||||
// this must be handled gracefully as an error instead of raising a
|
||||
// TypeError (the method is declared to return ?string)
|
||||
file_put_contents($this->_mock_yourls_service, '{"statusCode":200}');
|
||||
// TypeError (the method is declared to return ?string). YOURLS returns
|
||||
// the status code as a string, so mirror that here.
|
||||
file_put_contents($this->_mock_yourls_service, '{"statusCode":"200"}');
|
||||
|
||||
$yourls = new YourlsProxy($this->_conf, 'https://example.com/?foo#bar');
|
||||
$this->assertTrue($yourls->isError());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue