Skip to content

Commit e88f89d

Browse files
committed
Update tests to fail if exception not hit
1 parent 238a787 commit e88f89d

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

tests/Grant/AuthCodeGrantTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,7 @@ public function testValidateAuthorizationRequestInvalidScopes(): void
509509
return;
510510
}
511511

512-
$this->expectException(OAuthServerException::class);
513-
$this->expectExceptionCode(5);
512+
$this->fail('The expected exception was not thrown');
514513
}
515514

516515
public function testCompleteAuthorizationRequest(): void
@@ -595,8 +594,7 @@ public function testCompleteAuthorizationRequestDenied(): void
595594
return;
596595
}
597596

598-
$this->expectException(OAuthServerException::class);
599-
$this->expectExceptionCode(9);
597+
$this->fail('The expected exception was not thrown');
600598
}
601599

602600
public function testRespondToAccessTokenRequest(): void

tests/Grant/ImplicitGrantTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,7 @@ public function testValidateAuthorizationRequestInvalidScopes(): void
241241
return;
242242
}
243243

244-
$this->expectException(OAuthServerException::class);
245-
$this->expectExceptionCode(5);
244+
$this->fail('Did not throw expected exception');
246245
}
247246

248247
public function testCompleteAuthorizationRequest(): void
@@ -311,8 +310,7 @@ public function testCompleteAuthorizationRequestDenied(): void
311310
return;
312311
}
313312

314-
$this->expectException(OAuthServerException::class);
315-
$this->expectExceptionCode(9);
313+
$this->fail('Did not throw expected exception');
316314
}
317315

318316
public function testAccessTokenRepositoryUniqueConstraintCheck(): void

0 commit comments

Comments
 (0)