Skip to content

Commit

Permalink
Fix test namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
jlevers committed Aug 6, 2024
1 parent c8eb561 commit 25e84dc
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
},
"autoload-dev": {
"psr-4": {
"SellingPartnerApi\\Tests\\": "test/"
"SellingPartnerApi\\Tests\\": "tests/"
}
},
"scripts": {
Expand Down
2 changes: 2 additions & 0 deletions tests/AuthenticationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

declare(strict_types=1);

namespace SellingPartnerApi\Tests;

use PHPUnit\Framework\TestCase;
use Saloon\Config;
use Saloon\Exceptions\Request\Statuses\UnauthorizedException;
Expand Down
2 changes: 2 additions & 0 deletions tests/InMemoryTokenCacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

declare(strict_types=1);

namespace SellingPartnerApi\Tests;

use PHPUnit\Framework\TestCase;
use SellingPartnerApi\Authentication\AccessTokenAuthenticator;
use SellingPartnerApi\Authentication\InMemoryTokenCache;
Expand Down
4 changes: 4 additions & 0 deletions tests/OAuthTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

declare(strict_types=1);

namespace SellingPartnerApi\Tests;

use PHPUnit\Framework\TestCase;
use Saloon\Http\Faking\MockClient;
use Saloon\Http\Faking\MockResponse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php

namespace Seller\FBAInboundV0\Requests;
declare(strict_types=1);

namespace SellingPartnerApi\Tests\Seller\FBAInboundV0\Requests;

use DateTime;
use PHPUnit\Framework\TestCase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class ListDeliveryWindowOptionsTest extends TestCase
{
function testDeserializeDateTimeWithoutSeconds(): void
public function testDeserializeDateTimeWithoutSeconds(): void
{
$now = new DateTime();
$result = ListDeliveryWindowOptionsResponse::deserialize([
Expand All @@ -23,7 +23,7 @@ function testDeserializeDateTimeWithoutSeconds(): void
'validUntil' => '2024-09-24T00:00Z',
'deliveryWindowOptionId' => 'dwf5ab76c1-ed8a-4885-beb6-3a9992b6954e',
'startDate' => $now->format('Y-m-d\TH:i\Z'),
]
],
],
]);
$this->assertNotNull($result);
Expand All @@ -32,4 +32,4 @@ function testDeserializeDateTimeWithoutSeconds(): void
// of the original datetime
$this->assertEqualsWithDelta($now->getTimestamp(), $result->deliveryWindowOptions[0]->startDate->getTimestamp(), 60);
}
}
}
2 changes: 1 addition & 1 deletion tests/Seller/ReportsV20210630/Responses/ReportTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Seller\ReportsV20210630\Responses;
namespace SellingPartnerApi\Tests\Seller\ReportsV20210630\Responses;

use DateTime;
use DateTimeInterface;
Expand Down
4 changes: 4 additions & 0 deletions tests/Seller/ShippingV2/Requests/GetTrackingTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

declare(strict_types=1);

namespace SellingPartnerApi\Tests\Seller\ShippingV2\Requests;

use PHPUnit\Framework\TestCase;
use Saloon\Config;
use Saloon\Http\Faking\MockClient;
Expand Down
1 change: 0 additions & 1 deletion tests/SerializationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use SellingPartnerApi\Seller\OrdersV0\Dto\ConfirmShipmentRequest;
use SellingPartnerApi\Seller\OrdersV0\Dto\PackageDetail;
use SellingPartnerApi\Seller\OrdersV0\Requests\ConfirmShipment;
use SellingPartnerApi\Seller\ProductFeesV0\Responses\GetMyFeesEstimateResponse;
use SellingPartnerApi\Seller\ProductPricingV0\Dto\GetItemOffersBatchRequest;
use SellingPartnerApi\Seller\ProductPricingV0\Dto\ItemOffersRequest;
use SellingPartnerApi\Seller\ProductPricingV0\Requests\GetItemOffersBatch;
Expand Down
2 changes: 2 additions & 0 deletions tests/TokenCacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

declare(strict_types=1);

namespace SellingPartnerApi\Tests;

use PHPUnit\Framework\TestCase;
use Saloon\Config;
use Saloon\Http\Faking\MockClient;
Expand Down

0 comments on commit 25e84dc

Please sign in to comment.