Fix test output

This commit is contained in:
myrmidex 2025-08-11 18:26:00 +02:00
parent 1c772e63cb
commit d59128871e
4 changed files with 45 additions and 51 deletions

View file

@ -325,7 +325,7 @@ public function test_create_route_validates_required_fields()
public function test_create_route_creates_route_successfully()
{
$language = Language::first() ?? Language::factory()->create();
$language = Language::first();
$feed = Feed::factory()->language($language)->create();
$platformChannel = PlatformChannel::factory()->create();

View file

@ -3,10 +3,8 @@
namespace Tests\Unit\Modules\Lemmy\Services;
use App\Modules\Lemmy\Services\LemmyApiService;
use App\Modules\Lemmy\LemmyRequest;
use App\Models\PlatformChannelPost;
use App\Enums\PlatformEnum;
use Illuminate\Http\Client\Response;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
use Tests\TestCase;

View file

@ -5,10 +5,6 @@
use App\Services\Article\ArticleFetcher;
use App\Models\Feed;
use App\Models\Article;
use App\Services\Http\HttpFetcher;
use App\Services\Factories\HomepageParserFactory;
use App\Services\Factories\ArticleParserFactory;
use App\Services\Log\LogSaver;
use Tests\TestCase;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Http;
@ -24,7 +20,7 @@ protected function setUp(): void
// Mock all HTTP requests by default to prevent external calls
Http::fake([
'*' => Http::response('', 500)
'*' => Http::response('<html><body>Mock HTML content</body></html>', 200)
]);
}
@ -148,7 +144,7 @@ public function test_get_articles_from_website_feed_with_supported_parser(): voi
public function test_get_articles_from_website_feed_handles_invalid_url(): void
{
// HTTP mock already set in setUp() to return 500 for all requests
// HTTP mock already set in setUp() to return mock HTML for all requests
$feed = Feed::factory()->create([
'type' => 'website',