From c67c929696f8a3d7b402b479035f3007d68d0651 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Wed, 8 Jan 2014 21:23:12 -0500 Subject: [PATCH] Fixed test break. --- tests/unit/framework/validators/FileValidatorTest.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tests/unit/framework/validators/FileValidatorTest.php b/tests/unit/framework/validators/FileValidatorTest.php index f1a5e19..dca5c7b 100644 --- a/tests/unit/framework/validators/FileValidatorTest.php +++ b/tests/unit/framework/validators/FileValidatorTest.php @@ -177,12 +177,7 @@ class FileValidatorTest extends TestCase $val = new FileValidator(['maxSize' => 128]); $val->validateAttribute($m, 'attr_files'); $this->assertTrue($m->hasErrors('attr_files')); - $this->assertTrue( - stripos( - current($m->getErrors('attr_files')), - str_ireplace(['{file}', '{limit}'], [$m->attr_files->name, 128], $val->tooBig) - ) !== false - ); + $this->assertTrue(stripos(current($m->getErrors('attr_files')), 'too big') !== false); // to Small $m = $this->createModelForAttributeTest(); $val = new FileValidator(['minSize' => 2048]);