File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
tests/Symfony/Tests/Component/Validator/Constraints Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public function testEmptyStringIsValid()
40
40
41
41
public function testDateTimeClassIsValid ()
42
42
{
43
- $ this ->validator ->isValid (new \DateTime (), new Date ());
43
+ $ this ->assertTrue ( $ this -> validator ->isValid (new \DateTime (), new Date () ));
44
44
}
45
45
46
46
public function testExpectsStringCompatibleType ()
@@ -79,6 +79,8 @@ public function getInvalidDates()
79
79
{
80
80
return array (
81
81
array ('foobar ' ),
82
+ array ('foobar 2010-13-01 ' ),
83
+ array ('2010-13-01 foobar ' ),
82
84
array ('2010-13-01 ' ),
83
85
array ('2010-04-32 ' ),
84
86
array ('2010-02-29 ' ),
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public function testEmptyStringIsValid()
40
40
41
41
public function testDateTimeClassIsValid ()
42
42
{
43
- $ this ->validator ->isValid (new \DateTime (), new Time ());
43
+ $ this ->assertTrue ( $ this -> validator ->isValid (new \DateTime (), new Time () ));
44
44
}
45
45
46
46
public function testExpectsStringCompatibleType ()
@@ -79,6 +79,8 @@ public function getInvalidTimes()
79
79
{
80
80
return array (
81
81
array ('foobar ' ),
82
+ array ('foobar 12:34:56 ' ),
83
+ array ('12:34:56 foobar ' ),
82
84
array ('00:00 ' ),
83
85
array ('24:00:00 ' ),
84
86
array ('00:60:00 ' ),
You can’t perform that action at this time.
0 commit comments