File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -22,12 +22,13 @@ public function testConstruct()
2222
2323 /**
2424 * @expectedException PHPForm\Exceptions\ValidationError
25- * @expectedExceptionMessage The submitted file is empty .
25+ * @expectedExceptionMessage This field is required .
2626 */
2727 public function testValidateEmpty ()
2828 {
2929 $ data = array ('size ' => 0 );
30- $ this ->field ->validate ((object ) $ data );
30+ $ field = new FileField (["max_size " => 20 , "required " => true ]);
31+ $ field ->validate ((object ) $ data );
3132 }
3233
3334 /**
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ class FileTypeValidatorTest extends TestCase
1111
1212 public function setUp ()
1313 {
14- $ this ->data = (object ) array ('type ' => 'image/png ' );
14+ $ this ->data = (object ) array ('size ' => 10 , ' type ' => 'image/png ' );
1515 }
1616
1717 public function testValidType ()
You can’t perform that action at this time.
0 commit comments