|
@@ -5344,6 +5344,23 @@ class TestRefill extends TestCase
|
|
|
[$succ, $val] = $provider->query(['order_sn'=>'Test-Leyou-Oil1693375143']);
|
|
|
}
|
|
|
|
|
|
+ public function testLeyou_Waterno_By_Voucher()
|
|
|
+ {
|
|
|
+ $watorno1 = $this->Leyou_Waterno_By_Voucher('【中国石化】您尾号为211884的加油卡于08月30日 13时59分充值成功,金额50元,订单号:1623083013592106');
|
|
|
+ $watorno2 = $this->Leyou_Waterno_By_Voucher('【中国石化】您尾号为211884的加油卡于08月30日 13时59分充值成功,金额50元,订单号1623083013592106');
|
|
|
+ $watorno3 = $this->Leyou_Waterno_By_Voucher('【中国石化】您尾号为211884的加油卡于08月30日 13时59分充值成功,金额50元,订单号');
|
|
|
+ $watorno4 = $this->Leyou_Waterno_By_Voucher('');
|
|
|
+ }
|
|
|
+
|
|
|
+ private function Leyou_Waterno_By_Voucher($voucher):string {
|
|
|
+ $matches = [];
|
|
|
+ $ret = preg_match("/\:(\d+)/",$voucher,$matches);
|
|
|
+ if ($ret === 1 && !empty($matches)){
|
|
|
+ return $matches[1];
|
|
|
+ }
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
//docker-compose run phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefill::testLoadBlack)( .*)?$/" --test-suffix TestRefill.php /var/www/html/test
|