feat: scraping endpoints, job persistence, firsts unit tests, legacy entities usage

This commit is contained in:
ext.jeremy.guillot@maxicoffee.domains
2025-02-07 11:56:51 +01:00
parent c55cd62ec7
commit 0374ab0e46
34 changed files with 348 additions and 326 deletions

View File

@@ -21,7 +21,7 @@ class ScrapingStatusTest extends ApiTestCase
parent::setUp();
self::bootKernel();
$this->messageBus = self::getContainer()->get(MessageBusInterface::class);
$this->repository = self::getContainer()->get(ScrapingJobRepositoryInterface::class);
}
@@ -30,11 +30,11 @@ class ScrapingStatusTest extends ApiTestCase
{
// Given
$jobId = Uuid::uuid4()->toString();
$job = new ScrapingJob($jobId, 'manga-123', 'chapter-456', 'source-789');
$job = new ScrapingJob($jobId, 'manga-123', 1, 'source-789');
$job->addPage(new PageNumber(1), new ImageUrl('http://example.com/page1.jpg'));
$job->addPage(new PageNumber(2), new ImageUrl('http://example.com/page2.jpg'));
$this->repository->save($job);
// When
@@ -63,7 +63,7 @@ class ScrapingStatusTest extends ApiTestCase
protected function tearDown(): void
{
parent::tearDown();
self::ensureKernelShutdown();
}
}
}