mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
测试完善
This commit is contained in:
@@ -21,6 +21,16 @@ use think\Validate;
|
||||
class validateTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
public function testRule()
|
||||
{
|
||||
Validate::rule('zip', '/^\d{6}$/');
|
||||
Validate::rule([
|
||||
'currency' => '/^\d+(\.\d+)?$/',
|
||||
'number' => '/^\d+$/',
|
||||
'zip' => '/^\d{6}$/',
|
||||
]);
|
||||
}
|
||||
|
||||
public function testCheck()
|
||||
{
|
||||
$data = [
|
||||
|
||||
Reference in New Issue
Block a user