From 36644365c8622a249118ea72b50f0e468ea1e394 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 2 Sep 2025 21:55:03 +0300 Subject: use built-in feed for integration test --- tests/integration/ApiTest.php | 6 +++++- tests/integration/feed.xml | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 tests/integration/feed.xml (limited to 'tests/integration') diff --git a/tests/integration/ApiTest.php b/tests/integration/ApiTest.php index d7b605b6e..5cf364217 100644 --- a/tests/integration/ApiTest.php +++ b/tests/integration/ApiTest.php @@ -4,10 +4,12 @@ use PHPUnit\Framework\TestCase; /** @group integration */ final class ApiTest extends TestCase { private string $api_url = ""; + private string $app_url = ""; private string $sid = ""; function __construct() { $this->api_url = getenv('API_URL'); + $this->app_url = getenv('APP_URL'); parent::__construct(); } @@ -73,9 +75,11 @@ final class ApiTest extends TestCase { } public function test_subscribeToFeed() : void { - $resp = $this->api(["op" => "subscribeToFeed", "feed_url" => "https://gitlab.tt-rss.org/tt-rss/tt-rss.atom"]); + $resp = $this->api(["op" => "subscribeToFeed", "feed_url" => $this->app_url . "/feed.xml"]); $this->common_assertions($resp); + print_r($resp); + $this->assertArrayHasKey("feed_id", $resp['content']['status']); } diff --git a/tests/integration/feed.xml b/tests/integration/feed.xml new file mode 100644 index 000000000..a705b0f79 --- /dev/null +++ b/tests/integration/feed.xml @@ -0,0 +1,14 @@ + + + Atom:base testfeed + tag:fakecake.org,2021:minerva-feed + 2021-05-21T14:17:43+04:00 + + x-21may2020 + + tag:fakecake.org,2021:minerva-2021-05-20 + 2021-05-21T07:54:43+04:00 + 2021-05-21T07:54:43+04:00 + ... + + -- cgit v1.2.3-54-g00ecf