Yaffs site version 1.1
[yaffs-website] / vendor / drupal / console / templates / module / src / Tests / load-test.php.twig
1 {% extends "base/class.php.twig" %}
2
3 {% block file_path %}
4 \Drupal\Tests\{{ machine_name }}\Functional\LoadTest
5 {% endblock %}
6
7 {% block namespace_class %}
8 namespace Drupal\Tests\{{ machine_name }}\Functional;
9 {% endblock %}
10
11 {% block use_class %}
12 use Drupal\Core\Url;
13 use Drupal\Tests\BrowserTestBase;
14 {% endblock %}
15
16 {% block class_declaration %}
17 /**
18  * Simple test to ensure that main page loads with module enabled.
19  *
20  * @group {{ machine_name }}
21  */
22 class LoadTest extends BrowserTestBase {% endblock %}
23 {% block class_methods %}
24   /**
25    * Modules to enable.
26    *
27    * @var array
28    */
29   public static $modules = ['{{ machine_name }}'];
30
31   /**
32    * A user with permission to administer site configuration.
33    *
34    * @var \Drupal\user\UserInterface
35    */
36   protected $user;
37
38   /**
39    * {@inheritdoc}
40    */
41   protected function setUp() {
42     parent::setUp();
43     $this->user = $this->drupalCreateUser(['administer site configuration']);
44     $this->drupalLogin($this->user);
45   }
46
47   /**
48    * Tests that the home page loads with a 200 response.
49    */
50   public function testLoad() {
51     $this->drupalGet(Url::fromRoute('<front>'));
52     $this->assertResponse(200);
53   }
54 {% endblock %}