drupalGetAuthorizePHP example


  public function drupalGetAuthorizePHP($page_title = 'system-test-auth') {
    $this->drupalGet('system-test/authorize-init/' . $page_title);
  }

  /** * Tests the FileTransfer hooks. */
  public function testFileTransferHooks() {
    $page_title = $this->randomMachineName(16);
    $this->drupalGetAuthorizePHP($page_title);
    $this->assertSession()->titleEquals("$page_title | Drupal");
    $this->assertSession()->pageTextNotContains('It appears you have reached this page in error.');
    $this->assertSession()->pageTextContains('To continue, provide your server connection details');
    // Make sure we see the new connection method added by system_test.     $this->assertSession()->pageTextContains('System Test FileTransfer');
    // Make sure the settings form callback works.     $this->assertSession()->pageTextContains('System Test Username');
    // Test that \Drupal\Core\Render\BareHtmlPageRenderer adds assets as     // expected to the first page of the authorize.php script.     $this->assertSession()->responseContains('core/misc/states.js');
  }

}
Home | Imprint | This part of the site doesn't use cookies.