@@ -25,61 +25,72 @@ Assert::same('1985-12-09 11:22:59.123000', DateTime::fromParts(1985, 12, 9, 11,
25
25
26
26
Assert::exception (
27
27
fn () => DateTime::fromParts (1985 , 2 , 29 ),
28
- Nette \InvalidArgumentException ::class,
29
- " Invalid date ' 1985-02-29 00:00:0.00000' " ,
28
+ \Throwable ::class,
29
+ ' The date 1985-02-29 is not valid. ' ,
30
30
);
31
31
32
32
Assert::exception (
33
33
fn () => DateTime::fromParts (0 , 12 , 9 ),
34
- Nette \InvalidArgumentException::class,
34
+ \Throwable::class,
35
+ 'The date 0000-12-09 is not valid. ' ,
35
36
);
36
37
37
38
Assert::exception (
38
39
fn () => DateTime::fromParts (1985 , 0 , 9 ),
39
- Nette \InvalidArgumentException::class,
40
+ \Throwable::class,
41
+ 'The date 1985-00-09 is not valid. ' ,
40
42
);
41
43
42
44
Assert::exception (
43
45
fn () => DateTime::fromParts (1985 , 13 , 9 ),
44
- Nette \InvalidArgumentException::class,
46
+ \Throwable::class,
47
+ 'The date 1985-13-09 is not valid. ' ,
45
48
);
46
49
47
50
Assert::exception (
48
51
fn () => DateTime::fromParts (1985 , 12 , 0 ),
49
- Nette \InvalidArgumentException::class,
52
+ \Throwable::class,
53
+ 'The date 1985-12-00 is not valid. ' ,
50
54
);
51
55
52
56
Assert::exception (
53
57
fn () => DateTime::fromParts (1985 , 12 , 32 ),
54
- Nette \InvalidArgumentException::class,
58
+ \Throwable::class,
59
+ 'The date 1985-12-32 is not valid. ' ,
55
60
);
56
61
57
62
Assert::exception (
58
63
fn () => DateTime::fromParts (1985 , 12 , 9 , -1 ),
59
- Nette \InvalidArgumentException::class,
64
+ \Throwable::class,
65
+ 'The time -1:00:00.00000 is not valid. ' ,
60
66
);
61
67
62
68
Assert::exception (
63
69
fn () => DateTime::fromParts (1985 , 12 , 9 , 60 ),
64
- Nette \InvalidArgumentException::class,
70
+ \Throwable::class,
71
+ 'The time 60:00:00.00000 is not valid. ' ,
65
72
);
66
73
67
74
Assert::exception (
68
75
fn () => DateTime::fromParts (1985 , 12 , 9 , 0 , -1 ),
69
- Nette \InvalidArgumentException::class,
76
+ \Throwable::class,
77
+ 'The time 00:-1:00.00000 is not valid. ' ,
70
78
);
71
79
72
80
Assert::exception (
73
81
fn () => DateTime::fromParts (1985 , 12 , 9 , 0 , 60 ),
74
- Nette \InvalidArgumentException::class,
82
+ \Throwable::class,
83
+ 'The time 00:60:00.00000 is not valid. ' ,
75
84
);
76
85
77
86
Assert::exception (
78
87
fn () => DateTime::fromParts (1985 , 12 , 9 , 0 , 0 , -1 ),
79
- Nette \InvalidArgumentException::class,
88
+ \Throwable::class,
89
+ 'The time 00:00:-1.00000 is not valid. ' ,
80
90
);
81
91
82
92
Assert::exception (
83
93
fn () => DateTime::fromParts (1985 , 12 , 9 , 0 , 0 , 60 ),
84
- Nette \InvalidArgumentException::class,
94
+ \Throwable::class,
95
+ 'The time 00:00:60.00000 is not valid. ' ,
85
96
);
0 commit comments