- Привязка учетной записи (регистрация номера банковского счета в службе)
- Проверка OTP (введите код OTP, отправленный через мобильный телефон клиента)
В Codeception до сих пор я использовал Codeception\Lib\Actor\Shared\Pause:
Код: Выделить всё
public function testVerificationFlow()
{
$faker = Faker\Factory::create();
$sequence = '0000';
$partnerReferenceNo = $faker->numerify('###########') . $sequence;
$bankAccountNo = $faker->numerify('##########');
$bankCardNo = $faker->randomNumber(4, true);
$limit = 250000.00;
$email = $faker->email();
$custIdMerchant = $faker->numerify('##########');
$response = $this->autopay->accountBinding(
$partnerReferenceNo,
$bankAccountNo,
$bankCardNo,
$limit,
$email,
$custIdMerchant
);
codecept_debug($response);
$this->assertEquals($response->responseCode, self::RESP_CODE_ACCOUNT_BINDING);
$otpCode = '';
// how to inject the value of $otpCode here?
$this->pause();
codecept_debug($otpCode);
$verifyOtpResponse = $this->autopay->verifyOtp(
$partnerReferenceNo,
$response->originalReferenceNo,
$response->chargeToken,
$otpCode,
);
codecept_debug($verifyOtpResponse);
$this->assertEquals($verifyOtpResponse->responseCode, self::RESP_CODE_OTP_VERIFY);
}
Код: Выделить всё
Execution PAUSED, starting interactive shell...
Type in commands to try them:
- ENTER to continue
- TAB to auto-complete
- F5 to stash a command
- F6 to toggle auto-stashing of successful commands
- F8 to view stashed commands
- F10 to clear stashed commands
Подробнее здесь: https://stackoverflow.com/questions/790 ... odeception