You are here

EnablePhoneInternationalTest.php in International Phone 3.x

File

tests/src/Functional/EnablePhoneInternationalTest.php
View source
<?php

namespace Drupal\Tests\phone_international\Functional;

use Drupal\Core\Url;
use Drupal\Tests\BrowserTestBase;

/**
 * Simple test to ensure that main page loads with module enabled.
 *
 * @group phone_international
 */
class EnablePhoneInternationalTest extends BrowserTestBase {

  /**
   * Modules to enable.
   *
   * @var array
   */
  public static $modules = [
    'phone_international',
  ];

  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'stark';

  /**
   * A user with permission to administer site configuration.
   *
   * @var \Drupal\user\UserInterface
   */
  protected $user;

  /**
   * Tests that the home page loads with a 200 response.
   */
  public function testLoad() {
    $this
      ->drupalGet(Url::fromRoute('<front>'));
    $this
      ->assertSession()
      ->statusCodeEquals(200);
  }

  /**
   * {@inheritdoc}
   */
  protected function setUp() : void {
    parent::setUp();
    $this->user = $this
      ->drupalCreateUser([
      'administer site configuration',
    ]);
    $this
      ->drupalLogin($this->user);
  }

}

Classes

Namesort descending Description
EnablePhoneInternationalTest Simple test to ensure that main page loads with module enabled.