From 891230eb603055ed88b3279ac2bba3e2f9a9b1a1 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 31 Jul 2016 19:43:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E5=8D=95=E5=85=83=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/thinkphp/library/think/validateTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/thinkphp/library/think/validateTest.php b/tests/thinkphp/library/think/validateTest.php index 3a202c86..3ca592dd 100644 --- a/tests/thinkphp/library/think/validateTest.php +++ b/tests/thinkphp/library/think/validateTest.php @@ -48,13 +48,13 @@ class validateTest extends \PHPUnit_Framework_TestCase public function testRule() { $rule = [ - 'name' => 'require|alphaNum|max:25|expire:2016-1-1,2026-1-1', + 'name' => 'require|method:get|alphaNum|max:25|expire:2016-1-1,2026-1-1', 'account' => 'requireIf:name,thinkphp|alphaDash|min:4|length:4,30', 'age' => 'number|between:1,120', 'email' => 'requireWith:name|email', - 'host' => 'activeUrl', + 'host' => 'activeUrl|activeUrl:A', 'url' => 'url', - 'ip' => 'ip', + 'ip' => 'ip|ip:ipv4', 'score' => 'float|gt:60|notBetween:90,100|notIn:70,80|lt:100|elt:100|egt:60', 'status' => 'integer|in:0,1,2', 'begin_time' => 'after:2016-3-18', @@ -68,7 +68,7 @@ class validateTest extends \PHPUnit_Framework_TestCase 'nickname' => 'chsDash', 'aliasname' => 'chsAlphaNum', 'file' => 'file|fileSize:20480', - 'image' => 'image|fileMime:image/png', + 'image' => 'image|fileMime:image/png|image:80,80,png', ]; $data = [ 'name' => 'thinkphp',