'-off']); $sut = new ShuyunOpenPlatformLoyaltyGradeQueryShopIdResolver(new ShuyunOpenPlatformGatewayShopIdResolver()); $value = $sut->resolveShopIdQueryValue([ 'distributor_id' => 112345566, 'shop_code' => 'SHOULD_NOT_USE', ]); $this->assertSame('112345566-off', $value); } public function testMissingDistributorIdThrows(): void { $this->expectException(\InvalidArgumentException::class); (new ShuyunOpenPlatformLoyaltyGradeQueryShopIdResolver(new ShuyunOpenPlatformGatewayShopIdResolver()))->resolveShopIdQueryValue([ 'shop_code' => 'ONLY_CODE', ]); } public function testNonPositiveDistributorIdThrows(): void { $this->expectException(\InvalidArgumentException::class); (new ShuyunOpenPlatformLoyaltyGradeQueryShopIdResolver(new ShuyunOpenPlatformGatewayShopIdResolver()))->resolveShopIdQueryValue([ 'distributor_id' => 0, ]); } }