Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
mpysiak committed Oct 23, 2023
1 parent 40a2759 commit 8d81b63
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions spec/EventListener/ShippingExportEventListenerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
use Sylius\Component\Core\Model\Order;
use Sylius\Component\Core\Model\ShipmentInterface;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpFoundation\Session\SessionInterface;

final class ShippingExportEventListenerSpec extends ObjectBehavior
{
Expand All @@ -23,12 +26,12 @@ function it_is_initializable()

function let (
WebClientInterface $webClient,
FlashBagInterface $flashBag,
RequestStack $requestStack,
Filesystem $filesystem,
ObjectManager $objectManager
) {
$shippingLabelsPath = 'labels';
$this->beConstructedWith($webClient, $flashBag, $filesystem, $objectManager, $shippingLabelsPath);
$this->beConstructedWith($webClient, $requestStack, $filesystem, $objectManager, $shippingLabelsPath);
}

function it_export_shipment
Expand All @@ -38,10 +41,15 @@ function it_export_shipment
ShippingGatewayInterface $shippingGateway,
ShipmentInterface $shipment,
WebClientInterface $webClient,
Order $order
Order $order,
RequestStack $requestStack,
Session $session,
FlashBagInterface $flashBag,
)
{
$webClient->setShippingGateway($shippingGateway);
$requestStack->getSession()->willReturn($session);
$session->getFlashBag()->willReturn($flashBag);

$shippingGateway->getCode()->willReturn(ShippingExportEventListener::DPD_GATEWAY_CODE);

Expand Down

0 comments on commit 8d81b63

Please sign in to comment.