mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
Merge branch 'develop' into feat/openprovider-provider
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
|
||||
namespace App\Tests\MessageHandler;
|
||||
|
||||
use App\Message\ProcessWatchlistTrigger;
|
||||
use App\Message\UpdateDomainsFromWatchlist;
|
||||
use App\MessageHandler\ProcessWatchlistTriggerHandler;
|
||||
use App\Message\ProcessAllWatchlist;
|
||||
use App\Message\ProcessWatchlist;
|
||||
use App\MessageHandler\ProcessAllWatchlistHandler;
|
||||
use App\Tests\State\WatchlistUpdateProcessorTest;
|
||||
use PHPUnit\Framework\Attributes\DependsExternal;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
@@ -16,16 +16,16 @@ final class ProcessWatchlistTriggerHandlerTest extends KernelTestCase
|
||||
public function testSendMessage()
|
||||
{
|
||||
$container = self::getContainer();
|
||||
$handler = $container->get(ProcessWatchlistTriggerHandler::class);
|
||||
$handler = $container->get(ProcessAllWatchlistHandler::class);
|
||||
|
||||
/** @var TraceableMessageBus $bus */
|
||||
$bus = $container->get('messenger.bus.default');
|
||||
$bus->reset();
|
||||
|
||||
$handler(new ProcessWatchlistTrigger());
|
||||
$handler(new ProcessAllWatchlist());
|
||||
|
||||
$dispatched = $bus->getDispatchedMessages();
|
||||
$this->assertNotEmpty($dispatched);
|
||||
$this->assertInstanceOf(UpdateDomainsFromWatchlist::class, $dispatched[0]['message']);
|
||||
$this->assertInstanceOf(ProcessWatchlist::class, $dispatched[0]['message']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ namespace App\Tests\MessageHandler;
|
||||
|
||||
use App\Entity\Domain;
|
||||
use App\Entity\Watchlist;
|
||||
use App\Message\UpdateDomainsFromWatchlist;
|
||||
use App\MessageHandler\UpdateDomainsFromWatchlistHandler;
|
||||
use App\Message\ProcessWatchlist;
|
||||
use App\MessageHandler\ProcessWatchlistHandler;
|
||||
use App\Tests\State\WatchlistUpdateProcessorTest;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use PHPUnit\Framework\Attributes\DependsExternal;
|
||||
@@ -20,7 +20,7 @@ final class UpdateDomainsFromWatchlistHandlerTest extends KernelTestCase
|
||||
{
|
||||
$container = self::getContainer();
|
||||
$entityManager = $container->get(EntityManagerInterface::class);
|
||||
$handler = $container->get(UpdateDomainsFromWatchlistHandler::class);
|
||||
$handler = $container->get(ProcessWatchlistHandler::class);
|
||||
$bus = $container->get('messenger.bus.default');
|
||||
|
||||
$deletedDomainLdhName = new UuidV4().'.com';
|
||||
@@ -40,7 +40,7 @@ final class UpdateDomainsFromWatchlistHandlerTest extends KernelTestCase
|
||||
/* @var TraceableMessageBus $bus */
|
||||
$bus->reset();
|
||||
|
||||
$handler(new UpdateDomainsFromWatchlist($watchlist->getToken()));
|
||||
$handler(new ProcessWatchlist($watchlist->getToken()));
|
||||
|
||||
$this->expectNotToPerformAssertions();
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ class AbstractProviderTest extends ApiTestCase
|
||||
|
||||
// Trigger the Order Domain message
|
||||
$orderDomainHandler = self::getContainer()->get(OrderDomainHandler::class);
|
||||
$message = new OrderDomain($watchlist->getToken(), $domain->getLdhName());
|
||||
$message = new OrderDomain($watchlist->getToken(), $domain->getLdhName(), $domain->getUpdatedAt());
|
||||
$orderDomainHandler($message);
|
||||
|
||||
$this->assertResponseStatusCodeSame(200);
|
||||
|
||||
Reference in New Issue
Block a user