1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 13:12:41 +00:00

Tests and fixes for Miniflux with PDO

This commit is contained in:
J. King 2021-02-09 09:26:12 -05:00
parent 687995c497
commit 9ad4a37ddf
3 changed files with 17 additions and 3 deletions

View file

@ -880,7 +880,7 @@ class V1 extends \JKingWeb\Arsse\REST\AbstractHandler {
return new ErrorResponse("404", 404);
}
return new Response([
'id' => $icon['id'],
'id' => (int) $icon['id'],
'data' => $icon['type'].";base64,".base64_encode($icon['data']),
'mime_type' => $icon['type'],
]);
@ -954,9 +954,9 @@ class V1 extends \JKingWeb\Arsse\REST\AbstractHandler {
if ($entry['media_url']) {
$enclosures = [
[
'id' => $entry['id'], // NOTE: We don't have IDs for enclosures, but we also only have one enclosure per entry, so we can just re-use the same ID
'id' => (int) $entry['id'], // NOTE: We don't have IDs for enclosures, but we also only have one enclosure per entry, so we can just re-use the same ID
'user_id' => $uid,
'entry_id' => $entry['id'],
'entry_id' => (int) $entry['id'],
'url' => $entry['media_url'],
'mime_type' => $entry['media_type'] ?: "application/octet-stream",
'size' => 0,

View file

@ -0,0 +1,13 @@
<?php
/** @license MIT
* Copyright 2017 J. King, Dustin Wilson et al.
* See LICENSE and AUTHORS files for details */
declare(strict_types=1);
namespace JKingWeb\Arsse\TestCase\REST\Miniflux\PDO;
/** @covers \JKingWeb\Arsse\REST\Miniflux\V1<extended>
* @group optional */
class TestV1 extends \JKingWeb\Arsse\TestCase\REST\Miniflux\TestV1 {
use \JKingWeb\Arsse\Test\PDOTest;
}

View file

@ -118,6 +118,7 @@
<file>cases/REST/Miniflux/TestErrorResponse.php</file>
<file>cases/REST/Miniflux/TestStatus.php</file>
<file>cases/REST/Miniflux/TestV1.php</file>
<file>cases/REST/Miniflux/PDO/TestV1.php</file>
</testsuite>
<testsuite name="NCNv1">
<file>cases/REST/NextcloudNews/TestVersions.php</file>