Skip to content
Snippets Groups Projects
Commit ff78c63f authored by Patrick Kenny's avatar Patrick Kenny
Browse files

Merge branch 'unit_test' into '1.1.x'

add unit test to confirm core functionality

See merge request !27
parents 15934104 6b160b2c
No related branches found
No related tags found
No related merge requests found
Pipeline #388196 failed
<?php
declare(strict_types=1);
namespace Drupal\Tests\jsonapi_links\Functional;
use Drupal\Core\Url;
use Drupal\Tests\BrowserTestBase;
use Drupal\user\UserInterface;
/**
* Simple test to ensure that main page loads with module enabled.
*
* @group jsonapi_links
*/
class LoadTest extends BrowserTestBase {
/**
* Modules to enable.
*
* @var array
*/
protected static $modules = ['jsonapi_links'];
/**
* The default theme when not relying on core markup.
*
* @var string
*/
protected $defaultTheme = 'stark';
/**
* A user with permission to administer site configuration.
*
* @var \Drupal\user\UserInterface
*/
protected UserInterface $user;
/**
* {@inheritdoc}
*/
#[\Override]
protected function setUp(): void {
parent::setUp();
$this->user = $this->drupalCreateUser(['administer site configuration']);
$this->drupalLogin($this->user);
}
/**
* Tests that the home page loads with a 200 response.
*/
public function testLoad(): void {
$this->drupalGet(Url::fromRoute('<front>'));
$this->assertSession()->statusCodeEquals(200);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment