mirror of
https://github.com/friendica/friendica
synced 2025-05-10 17:44:09 +02:00
Fixing Response
This commit is contained in:
parent
ae24bf8d54
commit
6a9fff5100
11 changed files with 41 additions and 12 deletions
|
@ -37,6 +37,7 @@ class ApiResponseTest extends MockedTest
|
|||
$response = new ApiResponse($l10n, $args, new NullLogger(), $baseUrl, $twitterUser);
|
||||
$response->error(200, 'OK', 'error_message', 'xml');
|
||||
|
||||
self::assertEquals(['Content-type' => 'text/xml', 'HTTP/1.1 200 OK'], $response->getHeaders());
|
||||
self::assertEquals('<?xml version="1.0"?>' . "\n" .
|
||||
'<status xmlns="http://api.twitter.com" xmlns:statusnet="http://status.net/schema/api/1/" ' .
|
||||
'xmlns:friendica="http://friendi.ca/schema/api/1/" ' .
|
||||
|
@ -59,6 +60,7 @@ class ApiResponseTest extends MockedTest
|
|||
$response = new ApiResponse($l10n, $args, new NullLogger(), $baseUrl, $twitterUser);
|
||||
$response->error(200, 'OK', 'error_message', 'rss');
|
||||
|
||||
self::assertEquals(['Content-type' => 'application/rss+xml', 'HTTP/1.1 200 OK'], $response->getHeaders());
|
||||
self::assertEquals(
|
||||
'<?xml version="1.0"?>' . "\n" .
|
||||
'<status xmlns="http://api.twitter.com" xmlns:statusnet="http://status.net/schema/api/1/" ' .
|
||||
|
@ -82,6 +84,7 @@ class ApiResponseTest extends MockedTest
|
|||
$response = new ApiResponse($l10n, $args, new NullLogger(), $baseUrl, $twitterUser);
|
||||
$response->error(200, 'OK', 'error_message', 'atom');
|
||||
|
||||
self::assertEquals(['Content-type' => 'application/atom+xml', 'HTTP/1.1 200 OK'], $response->getHeaders());
|
||||
self::assertEquals(
|
||||
'<?xml version="1.0"?>' . "\n" .
|
||||
'<status xmlns="http://api.twitter.com" xmlns:statusnet="http://status.net/schema/api/1/" ' .
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue