|
@@ -918,15 +918,20 @@ class TestRefill extends TestCase
|
|
|
}
|
|
|
|
|
|
public function testCheckData(){
|
|
|
- $str = '2|110667993758599771-充值失败|';
|
|
|
- $str = '0|提交成功|-36557.7400';
|
|
|
+ $str = '|2|110667993758599771-充值失败|';
|
|
|
+// $str = '0|提交成功|-36557.7400';
|
|
|
// if(preg_match( '/^-*[0-9]{1,3}\|[\x{4e00}-\x{9fa5}]+\|-*[0-9]+\.*[0-9]+$/u',$str,$matches)) {
|
|
|
// return true;
|
|
|
// }
|
|
|
- if(preg_match('/^[0-3]\|[0-9]+-*[\x{4e00}-\x{9fa5}]+\|[0-9]*$/u',$str,$matches)){
|
|
|
- return true;
|
|
|
+// if(preg_match('/^[0-3]\|[0-9]+-*[\x{4e00}-\x{9fa5}]+\|[0-9]*$/u',$str,$matches)){
|
|
|
+// return true;
|
|
|
+// }
|
|
|
+// return false;
|
|
|
+ $resp = ltrim($str , '|');
|
|
|
+ $resp = explode('|' , $resp);
|
|
|
+ if(count($resp) != 3) {
|
|
|
+ return [false,'返回值错误'];
|
|
|
}
|
|
|
- return false;
|
|
|
}
|
|
|
|
|
|
public function testErrre()
|