feat: endpoint FetchMangaChapters et tests

This commit is contained in:
ext.jeremy.guillot@maxicoffee.domains
2025-02-11 18:00:49 +01:00
parent 3dc0a0b406
commit 879b8fa2dc
20 changed files with 424 additions and 45 deletions

View File

@@ -3,8 +3,8 @@
namespace App\Tests\Feature\Scraping;
use App\Domain\Scraping\Application\Command\ScrapeChapter;
use App\Tests\Domain\Scraping\Adapter\InMemoryMessageBus;
use App\Tests\Feature\AbstractApiTestCase;
use App\Tests\Shared\Adapter\InMemoryMessageBus;
use Symfony\Component\Messenger\MessageBusInterface;
class ScrapeChapterTest extends AbstractApiTestCase
@@ -14,7 +14,9 @@ class ScrapeChapterTest extends AbstractApiTestCase
protected function setUp(): void
{
parent::setUp();
$this->messageBus = self::getContainer()->get(MessageBusInterface::class);
$this->messageBus = new InMemoryMessageBus();
$this->container->set(MessageBusInterface::class, $this->messageBus);
$this->messageBus->clear();
}
public function testInitiateChapterScraping(): void
@@ -69,4 +71,10 @@ class ScrapeChapterTest extends AbstractApiTestCase
],
]);
}
protected function tearDown(): void
{
parent::tearDown();
$this->messageBus->clear();
}
}