You are here

protected function AuthCodeFunctionalTest::assertGrantForm in Simple OAuth (OAuth2) & OpenID Connect 8.3

Helper function to assert the current page is a valid grant form.

Throws

\Behat\Mink\Exception\ElementNotFoundException

\Behat\Mink\Exception\ExpectationException

2 calls to AuthCodeFunctionalTest::assertGrantForm()
AuthCodeFunctionalTest::testAuthCodeGrant in simple_oauth_extras/tests/src/Functional/AuthCodeFunctionalTest.php
Test the valid AuthCode grant.
AuthCodeFunctionalTest::testRememberClient in simple_oauth_extras/tests/src/Functional/AuthCodeFunctionalTest.php
Tests the remember client functionality.

File

simple_oauth_extras/tests/src/Functional/AuthCodeFunctionalTest.php, line 232

Class

AuthCodeFunctionalTest
@group simple_oauth_extras

Namespace

Drupal\Tests\simple_oauth_extras\Functional

Code

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');
}