feat: scraping endpoints, job persistence, firsts unit tests, legacy entities usage
This commit is contained in:
parent
c55cd62ec7
commit
0374ab0e46
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user