jquery_deprecated_functions-1.0.1/tests/src/Functional/JQueryDeprecatedAdminTest.php
tests/src/Functional/JQueryDeprecatedAdminTest.php
<?php
namespace Drupal\Tests\timepicker\Functional;
use Drupal\Tests\BrowserTestBase;
/**
* Tests the jQuery Deprecated Functions module.
*
* @group jquery_deprecated_functions
*/
class JQueryDeprecatedAdminTest extends BrowserTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = ['node', 'jquery_deprecated_functions'];
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
protected function setUp(): void {
// Make sure to complete the normal setup steps first.
parent::setUp();
// Create and log in an administrative user.
$this->drupalLogin($this->rootUser);
}
/**
* Tests if user can load the front page among other things.
*/
public function testLoadSite() {
// Load the front page.
$this->drupalGet('<front>');
// Confirm that the site didn't throw a server error or something else.
$this->assertSession()->statusCodeEquals(200);
$this->drupalGet("user");
}
/**
* Tests if an admin user can log in.
*/
public function testAdminUser() {
// Log in an administrative user.
$this->drupalLogin($this->rootUser);
$this->drupalGet('admin/config');
$session = $this->assertSession();
$session->statusCodeEquals(200);
}
/**
* Tests if an admin access to pages again.
*/
public function testAdminUserAfterChanges() {
// Log in an administrative user.
$this->drupalLogin($this->rootUser);
$this->drupalGet('admin/modules');
$session = $this->assertSession();
$session->statusCodeEquals(200);
}
}
