@@ -25,61 +25,72 @@ Assert::same('1985-12-09 11:22:59.123000', DateTime::fromParts(1985, 12, 9, 11,
2525
2626Assert::exception (
2727 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. ' ,
3030);
3131
3232Assert::exception (
3333 fn () => DateTime::fromParts (0 , 12 , 9 ),
34- Nette \InvalidArgumentException::class,
34+ Throwable::class,
35+ 'The date 0000-12-09 is not valid. ' ,
3536);
3637
3738Assert::exception (
3839 fn () => DateTime::fromParts (1985 , 0 , 9 ),
39- Nette \InvalidArgumentException::class,
40+ Throwable::class,
41+ 'The date 1985-00-09 is not valid. ' ,
4042);
4143
4244Assert::exception (
4345 fn () => DateTime::fromParts (1985 , 13 , 9 ),
44- Nette \InvalidArgumentException::class,
46+ Throwable::class,
47+ 'The date 1985-13-09 is not valid. ' ,
4548);
4649
4750Assert::exception (
4851 fn () => DateTime::fromParts (1985 , 12 , 0 ),
49- Nette \InvalidArgumentException::class,
52+ Throwable::class,
53+ 'The date 1985-12-00 is not valid. ' ,
5054);
5155
5256Assert::exception (
5357 fn () => DateTime::fromParts (1985 , 12 , 32 ),
54- Nette \InvalidArgumentException::class,
58+ Throwable::class,
59+ 'The date 1985-12-32 is not valid. ' ,
5560);
5661
5762Assert::exception (
5863 fn () => DateTime::fromParts (1985 , 12 , 9 , -1 ),
59- Nette \InvalidArgumentException::class,
64+ Throwable::class,
65+ 'The time -1:00:00.00000 is not valid. ' ,
6066);
6167
6268Assert::exception (
6369 fn () => DateTime::fromParts (1985 , 12 , 9 , 60 ),
64- Nette \InvalidArgumentException::class,
70+ Throwable::class,
71+ 'The time 60:00:00.00000 is not valid. ' ,
6572);
6673
6774Assert::exception (
6875 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. ' ,
7078);
7179
7280Assert::exception (
7381 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. ' ,
7584);
7685
7786Assert::exception (
7887 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. ' ,
8090);
8191
8292Assert::exception (
8393 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. ' ,
8596);
0 commit comments