[ECS] Apply ecs fixes

This commit is contained in:
Rafikooo 2024-02-27 14:14:38 +01:00
parent 09c89503ab
commit 49f5a17911
No known key found for this signature in database
GPG key ID: 4A26D8327BC2442B
7 changed files with 7 additions and 16 deletions

View file

@ -65,7 +65,7 @@ final class OrdersTest extends JsonApiTestCase
$this->requestGet(
uri: '/api/v2/admin/orders',
queryParameters: ['channel.code' => (string) $channel->getCode()],
queryParameters: ['channel.code' => $channel->getCode()],
);
$this->assertResponseSuccessful('admin/order/get_orders_filtered_by_channel_response');
@ -164,7 +164,7 @@ final class OrdersTest extends JsonApiTestCase
yield 'checkoutCompletedBefore' => [
'tokenValue' => 'firstOrderToken',
'checkoutsCompletedAt' => [
'2024-01-01T00:00:00+00:00'
'2024-01-01T00:00:00+00:00',
],
'requestedLimit' => [
'filterType' => FilterTypes::Before,
@ -176,7 +176,7 @@ final class OrdersTest extends JsonApiTestCase
yield 'checkoutCompletedStrictlyBefore' => [
'tokenValue' => 'firstOrderToken',
'checkoutsCompletedAt' => [
'2024-01-01T00:00:00+00:00'
'2024-01-01T00:00:00+00:00',
],
'requestedLimit' => [
'filterType' => FilterTypes::StrictlyBefore,

View file

@ -582,7 +582,7 @@ final class PromotionsTest extends JsonApiTestCase
$fixtures = $this->loadFixturesFromFiles([
'authentication/api_administrator.yaml',
'channel.yaml',
'promotion/promotion.yaml'
'promotion/promotion.yaml',
]);
/** @var PromotionInterface $promotion */
@ -607,7 +607,7 @@ final class PromotionsTest extends JsonApiTestCase
$fixtures = $this->loadFixturesFromFiles([
'authentication/api_administrator.yaml',
'channel.yaml',
'promotion/promotion.yaml'
'promotion/promotion.yaml',
]);
/** @var PromotionInterface $promotion */

View file

@ -144,7 +144,7 @@ final class ShipmentsTest extends JsonApiTestCase
$this->client->request(
method: 'GET',
uri: '/api/v2/admin/shipments/' . $shipment->getId() . '/adjustments',
server: $this->buildHeadersWithJsonLd('api@example.com')
server: $this->buildHeadersWithJsonLd('api@example.com'),
);
$response = $this->client->getResponse();

View file

@ -30,9 +30,7 @@ abstract class JsonApiTestCase extends BaseJsonApiTestCase
private bool $isAdminContext = false;
/**
* @var array <string, string>
*/
/** @var array <string, string> */
private array $defaultGetHeaders = [];
/**

View file

@ -13,8 +13,6 @@ declare(strict_types=1);
namespace Sylius\Tests\Api\Shop;
use Sylius\Component\Core\Model\AdjustmentInterface;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Customer\Model\CustomerInterface;
use Sylius\Tests\Api\JsonApiTestCase;
use Sylius\Tests\Api\Utils\OrderPlacerTrait;

View file

@ -15,8 +15,6 @@ namespace Sylius\Tests\Api\Shop;
use Sylius\Bundle\ApiBundle\Command\Cart\PickupCart;
use Sylius\Component\Addressing\Model\CountryInterface;
use Sylius\Component\Core\Model\AdjustmentInterface;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Tests\Api\JsonApiTestCase;
use Sylius\Tests\Api\Utils\OrderPlacerTrait;
use Sylius\Tests\Api\Utils\ShopUserLoginTrait;

View file

@ -16,10 +16,7 @@ namespace Sylius\Tests\Api\Utils;
enum FilterTypes: string
{
case Before = 'before';
case StrictlyBefore = 'strictly_before';
case After = 'after';
case StrictlyAfter = 'strictly_after';
}