Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-novotny committed Oct 22, 2023
1 parent 9efc431 commit d614219
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/Definitions/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,16 @@ final class Service extends BaseEnum
*/
public const ZASILKOVNA_IE_ANPOST_HD = '9990';

/**
* IE FedEx HD Connect Plus
*/
public const ZASILKOVNA_IE_FEDEX_HD_CONNECT_PLUS = '24810';

/**
* IE FedEx HD Priority
*/
public const ZASILKOVNA_IE_FEDEX_HD_PRIORITY = '24811';

/**
* IT Bartolini Home
*/
Expand Down Expand Up @@ -2388,6 +2398,8 @@ private static function zasilkovna(): array
self::ZASILKOVNA_CH_POST_HD,
// self::ZASILKOVNA_IE_HERMES_HD,
self::ZASILKOVNA_IE_ANPOST_HD,
self::ZASILKOVNA_IE_FEDEX_HD_CONNECT_PLUS,
self::ZASILKOVNA_IE_FEDEX_HD_PRIORITY,
self::ZASILKOVNA_IL_FEDEX_PRIORITY_HD,
self::ZASILKOVNA_IL_FEDEX_ECONOMY_HD,
self::ZASILKOVNA_IT_BARTOLINI_HD,
Expand Down
23 changes: 23 additions & 0 deletions src/Model/Branch/DefaultBranchResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,20 @@ public function hasFullBranchesSupport(string $carrier, ?string $service): bool
Service::SAMEDAY_LOCKER_RETURN,
],
Carrier::MAGYARPOSTA => null,
Carrier::RABEN => [
Service::RABEN_CLASSIC_TIME,
Service::RABEN_PREMIUM_TIME,
],
Carrier::DHLFREIGHTEC => [
Service::DHLFREIGHTEC_ECD_B2B,
Service::DHLFREIGHTEC_ECD_B2C,
],
Carrier::KURIER => [
Service::KURIER_GARANTED,
Service::KURIER_GARANTED_BRANCH,
Service::KURIER_STANDARD,
Service::KURIER_STANDARD_BRANCH,
],
];

return $this->hasSupport($supported, $carrier, $service);
Expand All @@ -91,12 +105,21 @@ public function hasBranchCountryFilterSupport(string $carrier, ?string $service)
Carrier::ULOZENKA => null,
Carrier::PBH => [
Service::PBH_CP_NP,
Service::PBH_SPS,
Service::PBH_SP,
Service::PBH_MP,
Service::PBH_RP,
Service::PBH_INPOST_KURIER,
Service::PBH_FAN_KURIER,
Service::PBH_SPEEDY,
Service::PBH_ECONT,
],
Carrier::SPS => null,
Carrier::RABEN => null,
Carrier::SAMEDAY => null,
Carrier::ZASILKOVNA => null,
Carrier::KURIER => null,
Carrier::MAGYARPOSTA => null,
];

return $this->hasSupport($supported, $carrier, $service);
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/ChangesSupportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function testLatestChangesSupport(): void

$changelog = $infoService->getChangelog();

$expected = (float) '1.979';
$expected = (float) '1.987';
$actual = (float) $changelog->getLatestVersion();

if ($actual > $expected) {
Expand Down

0 comments on commit d614219

Please sign in to comment.