File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
tests/Exception/UserException Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 2525#[Attribute(Attribute::TARGET_CLASS )]
2626class UserException extends Exception
2727{
28- public static function is (Throwable $ throwable ): bool
28+ public static function isUserException (Throwable $ throwable ): bool
2929 {
3030 if ($ throwable instanceof self) {
3131 return true ;
Original file line number Diff line number Diff line change 99 * @var HtmlRenderer $this
1010 */
1111
12- if (UserException::is ($ throwable )) {
12+ if (UserException::isUserException ($ throwable )) {
1313 $ name = $ this ->getThrowableName ($ throwable );
1414 $ message = $ throwable ->getMessage ();
1515} else {
Original file line number Diff line number Diff line change @@ -23,16 +23,16 @@ public function testUserExceptionInstance(): void
2323 assertInstanceOf (Exception::class, $ exception );
2424 }
2525
26- public static function dataIs (): iterable
26+ public static function dataIsUserException (): iterable
2727 {
2828 yield [true , new UserException ()];
2929 yield [false , new Exception ()];
3030 yield [true , new NotFoundException ()];
3131 }
3232
33- #[DataProvider('dataIs ' )]
34- public function testIs (bool $ expected , Throwable $ exception ): void
33+ #[DataProvider('dataIsUserException ' )]
34+ public function testIsUserException (bool $ expected , Throwable $ exception ): void
3535 {
36- assertSame ($ expected , UserException::is ($ exception ));
36+ assertSame ($ expected , UserException::isUserException ($ exception ));
3737 }
3838}
You can’t perform that action at this time.
0 commit comments