protected function AuthCodeFunctionalTest::assertGrantForm in Simple OAuth (OAuth2) & OpenID Connect 8.4
Same name and namespace in other branches
- 5.x tests/src/Functional/AuthCodeFunctionalTest.php \Drupal\Tests\simple_oauth\Functional\AuthCodeFunctionalTest::assertGrantForm()
Helper function to assert the current page is a valid grant form.
Throws
\Behat\Mink\Exception\ElementNotFoundException
\Behat\Mink\Exception\ExpectationException
3 calls to AuthCodeFunctionalTest::assertGrantForm()
- AuthCodeFunctionalTest::testAuthCodeGrant in tests/
src/ Functional/ AuthCodeFunctionalTest.php - Test the valid AuthCode grant.
- AuthCodeFunctionalTest::testClientAuthCodeGrantWithPkce in tests/
src/ Functional/ AuthCodeFunctionalTest.php - Test the AuthCode grant with PKCE.
- AuthCodeFunctionalTest::testRememberClient in tests/
src/ Functional/ AuthCodeFunctionalTest.php - Tests the remember client functionality.
File
- tests/
src/ Functional/ AuthCodeFunctionalTest.php, line 300
Class
- AuthCodeFunctionalTest
- The auth code test.
Namespace
Drupal\Tests\simple_oauth\FunctionalCode
protected function assertGrantForm() {
$assert_session = $this
->assertSession();
$assert_session
->statusCodeEquals(200);
$assert_session
->titleEquals('Grant Access to Client | Drupal');
$assert_session
->buttonExists('Grant');
$assert_session
->responseContains('Permissions');
}