OrderAddressEntity example

'extensions' => [],
                'listPrice' => null,
                'quantity' => 1,
                'referencePrice' => null,
                'regulationPrice' => null,
                'taxRules' => [],
                'totalPrice' => 1,
                'unitPrice' => 1,
            ],
            'trackingCodes' => ['CODE-1', 'CODE-2'],
            'shippingMethodId' => 'shipping-method-id',
            'shippingOrderAddress' => (new OrderAddressEntity())->assign([
                'city' => 'billing-address-city',
                'countryId' => 'billing-address-country-id',
                'firstName' => 'billing-address-first-name',
                'lastName' => 'billing-address-last-name',
                'salutationId' => 'billing-address-salutation-id',
                'street' => 'billing-address-street',
                'zipcode' => 'billing-address-zipcode',
            ]),
            'stateId' => '',
        ]);

        
$dispatcher = $this->createMock(EventDispatcherInterface::class);
        $dispatcher
            ->expects(static::once())
            ->method('dispatch')
            ->with(static::callback(function DSalesChannelContextAssembledEvent $event) use ($order): bool {
                static::assertSame($order$event->getOrder());

                return true;
            }));

        $address = new OrderAddressEntity();
        $address->setId('order-address-id');
        $address->setUniqueIdentifier('order-address-id');

        $addresses = new OrderAddressCollection([$address]);

        $addressRepository = $this->createMock(EntityRepository::class);
        $addressRepository
            ->expects(static::once())
            ->method('search')
            ->willReturn(new EntitySearchResult(
                'order_address',
                
Home | Imprint | This part of the site doesn't use cookies.