test Drupal site working on Koality Theme Builder
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
907 B

4 years ago
  1. <?php
  2. namespace Drupal\Tests\koality_theme\Functional;
  3. use Drupal\Core\Url;
  4. use Drupal\Tests\BrowserTestBase;
  5. /**
  6. * Simple test to ensure that main page loads with module enabled.
  7. *
  8. * @group koality_theme
  9. */
  10. class LoadTest extends BrowserTestBase {
  11. /**
  12. * Modules to enable.
  13. *
  14. * @var array
  15. */
  16. public static $modules = ['koality_theme'];
  17. /**
  18. * A user with permission to administer site configuration.
  19. *
  20. * @var \Drupal\user\UserInterface
  21. */
  22. protected $user;
  23. /**
  24. * {@inheritdoc}
  25. */
  26. protected function setUp() {
  27. parent::setUp();
  28. $this->user = $this->drupalCreateUser(['administer site configuration']);
  29. $this->drupalLogin($this->user);
  30. }
  31. /**
  32. * Tests that the home page loads with a 200 response.
  33. */
  34. public function testLoad() {
  35. $this->drupalGet(Url::fromRoute('<front>'));
  36. $this->assertSession()->statusCodeEquals(200);
  37. }
  38. }