mirror of
https://github.com/friendica/friendica
synced 2024-11-09 23:02:54 +00:00
Add assertions for NotificationTest
This commit is contained in:
parent
245d194f87
commit
f6e09204e9
1 changed files with 9 additions and 1 deletions
|
@ -78,7 +78,15 @@ XML;
|
|||
$notification = new Notification(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']);
|
||||
$response = $notification->run();
|
||||
|
||||
$this->toJson($response);
|
||||
$json = $this->toJson($response);
|
||||
|
||||
self::assertIsArray($json);
|
||||
|
||||
foreach ($json as $note) {
|
||||
self::assertIsInt($note->id);
|
||||
self::assertIsInt($note->uid);
|
||||
self::assertIsString($note->msg);
|
||||
}
|
||||
|
||||
self::assertEquals(['Content-type' => ['application/json'], ICanCreateResponses::X_HEADER => ['json']], $response->getHeaders());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue