File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1616 "php" : " >=8.0.0" ,
1717 "ext-json" : " *" ,
1818 "ext-pdo" : " *" ,
19- "psr/simple-cache" : " >=1.0" ,
2019 "psr/log" : " >=1.0" ,
21- "topthink/think-helper" :" ^3.1" ,
22- "topthink/think-validate" :" ^3.0"
20+ "psr/simple-cache" : " ^3.0" ,
21+ "topthink/think-helper" : " ^3.1" ,
22+ "topthink/think-validate" : " ^3.0"
2323 },
2424 "require-dev" : {
2525 "phpunit/phpunit" : " ^9.6|^10"
Original file line number Diff line number Diff line change 44
55use PHPUnit \Framework \TestCase ;
66use think \db \CacheItem ;
7- // use think\db\exception\InvalidArgumentException;
7+ use think \db \exception \InvalidArgumentException ;
88use DateTime ;
99use DateInterval ;
1010use DateTimeInterface ;
@@ -155,8 +155,8 @@ public function testCacheItemInvalidExpiration(): void
155155 {
156156 $ cache = new CacheItem ('invalid_expire_key ' );
157157
158- $ this ->expectException (\Error ::class);
159- $ this ->expectExceptionMessage ('Interface "Psr\SimpleCache\InvalidArgumentException" not found ' );
158+ $ this ->expectException (InvalidArgumentException ::class);
159+ $ this ->expectExceptionMessage ('not support datetime ' );
160160
161161 $ cache ->expire ('invalid_date_string ' );
162162 }
@@ -165,8 +165,8 @@ public function testCacheItemInvalidExpiresAfter(): void
165165 {
166166 $ cache = new CacheItem ('invalid_expires_after_key ' );
167167
168- $ this ->expectException (\Error ::class);
169- $ this ->expectExceptionMessage ('Interface "Psr\SimpleCache\InvalidArgumentException" not found ' );
168+ $ this ->expectException (InvalidArgumentException ::class);
169+ $ this ->expectExceptionMessage ('not support datetime ' );
170170
171171 $ cache ->expiresAfter ('invalid_interval ' );
172172 }
You can’t perform that action at this time.
0 commit comments