本文整理汇总了PHP中TestHelper::getRandName方法的典型用法代码示例。如果您正苦于以下问题:PHP TestHelper::getRandName方法的具体用法?PHP TestHelper::getRandName怎么用?PHP TestHelper::getRandName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestHelper
的用法示例。
在下文中一共展示了TestHelper::getRandName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getMockUpBaseChargeModel
public static function getMockUpBaseChargeModel()
{
$baseChargePayload = new \com\checkout\ApiServices\Charges\RequestModels\BaseCharge();
$baseChargePayload->setEmail(TestHelper::getRandName() . '@checkout.com');
$baseChargePayload->setAutoCapture('N');
$baseChargePayload->setAutoCaptime('0');
$baseChargePayload->setValue('100');
$baseChargePayload->setCurrency('usd');
$baseChargePayload->setTrackId('TrackId-' . rand(0, 1000));
$baseChargePayload->setShippingDetails(TestHelper::getMockUpAddress());
return $baseChargePayload;
}
示例2: getMockUpVoidCharge
public static function getMockUpVoidCharge($chargeService)
{
$cardChargeModel = new \com\checkout\ApiServices\Charges\RequestModels\CardIdChargeCreate();
$chargePayload = \test\TestHelper::getBaseChargeModel($cardChargeModel);
$chargePayload->setCardId('card_0b5f6a81-2cc0-47cb-859b-601f7f97eebd');
$chargePayload->setCustomerId('cust_E282D596-A5F9-4A9D-AE37-B92C0B0C2C55');
$chargePayload->setEmail(TestHelper::getRandName() . '@checkout.com');
$chargeResponse = $chargeService->chargeWithCardId($chargePayload);
return $chargeResponse;
}