feat: endpoint FetchMangaChapters et tests
This commit is contained in:
parent
3dc0a0b406
commit
879b8fa2dc
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user