mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
测试完善
This commit is contained in:
@@ -21,6 +21,16 @@ use think\Validate;
|
|||||||
class validateTest extends \PHPUnit_Framework_TestCase
|
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()
|
public function testCheck()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
|
|||||||
Reference in New Issue
Block a user