LoadTest.php in Configuration Inspector 8
File
tests/src/Functional/LoadTest.php
View source
<?php
namespace Drupal\Tests\config_inspector\Functional;
use Drupal\Core\Url;
use Drupal\Tests\BrowserTestBase;
class LoadTest extends BrowserTestBase {
protected $defaultTheme = 'stark';
protected static $modules = [
'config_inspector',
];
protected $user;
protected function setUp() : void {
parent::setUp();
$this->user = $this
->drupalCreateUser([
'administer site configuration',
]);
$this
->drupalLogin($this->user);
}
public function testLoad() {
$this
->drupalGet(Url::fromRoute('<front>'));
$this
->assertSession()
->statusCodeEquals(200);
}
}
Classes
Name |
Description |
LoadTest |
Simple test to ensure that main page loads with module enabled. |