for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the Spryker Commerce OS.
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
declare(strict_types = 1);
namespace PyzTest\Zed\MessageBroker\MessageHandlers\SearchHttp\Communication;
use Codeception\Test\Unit;
use PyzTest\Zed\MessageBroker\SearchHttpCommunicationTester;
* Auto-generated group annotations
*
* @group PyzTest
* @group Zed
* @group MessageBroker
* @group MessageHandlers
* @group SearchHttp
* @group Communication
* @group SearchEndpointMessageTest
* Add your own group annotations below this line
class SearchEndpointMessageTest extends Unit
{
protected SearchHttpCommunicationTester $tester;
public function testSearchEndpointAvailableMessageIsSuccessfullyHandled(): void
// Arrange
$this->tester->removeHttpConfig();
$searchEndpointAvailableTransfer = $this->tester->buildSearchEndpointAvailableTransfer();
// Act
$this->tester->handleSearchMessage($searchEndpointAvailableTransfer);
// Assert
$this->tester->assertSearchHttpConfigExistsForStore();
}
public function testSearchEndpointRemovedMessageIsSuccessfullyHandled(): void
$this->tester->handleSearchMessage(
$this->tester->buildSearchEndpointAvailableTransfer(),
);
$searchEndpointRemovedTransfer = $this->tester->buildSearchEndpointRemovedTransfer();
$this->tester->handleSearchMessage($searchEndpointRemovedTransfer);
$this->tester->assertSearchHttpConfigIsRemoved();