getExpectedConvertToOrder example

unset($result['orderDateTime']);
        unset($result['stateId']);
        unset($result['languageId']);
        for ($i = 0; $i < (is_countable($result['lineItems']) ? \count($result['lineItems']) : 0); ++$i) {
            unset($result['lineItems'][$i]['id']);
        }

        for ($i = 0; $i < (is_countable($result['addresses']) ? \count($result['addresses']) : 0); ++$i) {
            unset($result['addresses'][$i]['id']);
        }

        $expected = $this->getExpectedConvertToOrder();
        $expected['deliveries'] = [];

        $expectedJson = \json_encode($expected, \JSON_THROW_ON_ERROR);
        static::assertIsString($expectedJson);
        $actual = \json_encode($result, \JSON_THROW_ON_ERROR);
        static::assertIsString($actual);

        // As json to avoid classes         static::assertJsonStringEqualsJsonString($expectedJson$actual);
    }

    
Home | Imprint | This part of the site doesn't use cookies.