[ 'carrierId' => 'zpointcz', 'expectedGroups' => [ 'zpoint', 'zbox', ], ], 'SK' => [ 'carrierId' => 'zpointsk', 'expectedGroups' => [ 'zpoint', 'zbox', ], ], 'HU' => [ 'carrierId' => 'zpointhu', 'expectedGroups' => [ 'zpoint', 'zbox', ], ], 'RO' => [ 'carrierId' => 'zpointro', 'expectedGroups' => [ 'zpoint', 'zbox', ], ], 'numeric' => [ 'carrierId' => '106', 'expectedGroups' => [], ], 'not-existing' => [ 'carrierId' => 'dummy', 'expectedGroups' => [], ], ]; } /** * @dataProvider compoundCarrierGroupsProvider */ public function testGetCompoundCarrierVendorGroups( string $carrierId, array $expectedGroups ): void { $featureFlagProvider = $this->createMock( FeatureFlagProvider::class ); $featureFlagProvider->method( 'isSplitActive' ) ->willReturn( true ); $packetaPickupPointsConfig = new PacketaPickupPointsConfig( new CompoundCarrierCollectionFactory(), new VendorCollectionFactory(), $featureFlagProvider, ); self::assertEquals( $expectedGroups, $packetaPickupPointsConfig->getCompoundCarrierVendorGroups( $carrierId ) ); } }