测试完善

This commit is contained in:
thinkphp
2016-03-06 20:15:17 +08:00
parent 6e9812aaf9
commit 1bcb444642

View File

@@ -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 = [