diff options
author | Esha | 2019-07-02 12:42:54 +0530 |
---|---|---|
committer | Esha | 2019-07-02 12:43:10 +0530 |
commit | 141ce8c97abe36f1f8bb06a38623e93563d6c618 (patch) | |
tree | 2086c9224072aa7b917da20487b232eb2ef0666e /modules/esha/lab/tests/src/Functional | |
parent | 847360bf5ac011771dc013677542ece7b356a528 (diff) | |
download | acadmix_distribution-141ce8c97abe36f1f8bb06a38623e93563d6c618.tar.gz acadmix_distribution-141ce8c97abe36f1f8bb06a38623e93563d6c618.tar.bz2 acadmix_distribution-141ce8c97abe36f1f8bb06a38623e93563d6c618.zip |
Custom modules
Diffstat (limited to 'modules/esha/lab/tests/src/Functional')
-rw-r--r-- | modules/esha/lab/tests/src/Functional/LoadTest.php | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/modules/esha/lab/tests/src/Functional/LoadTest.php b/modules/esha/lab/tests/src/Functional/LoadTest.php new file mode 100644 index 0000000..918be07 --- /dev/null +++ b/modules/esha/lab/tests/src/Functional/LoadTest.php @@ -0,0 +1,46 @@ +<?php + +namespace Drupal\Tests\lab\Functional; + +use Drupal\Core\Url; +use Drupal\Tests\BrowserTestBase; + +/** + * Simple test to ensure that main page loads with module enabled. + * + * @group lab + */ +class LoadTest extends BrowserTestBase { + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = ['lab']; + + /** + * A user with permission to administer site configuration. + * + * @var \Drupal\user\UserInterface + */ + protected $user; + + /** + * {@inheritdoc} + */ + protected function setUp() { + 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() { + $this->drupalGet(Url::fromRoute('<front>')); + $this->assertSession()->statusCodeEquals(200); + } + +} |