1d: Add first functional test
Ensure that anonymous users can view the site’s front page.
This commit is contained in:
parent
2dafec2f67
commit
fd921d3e4c
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Tests\my_module\Functional;
|
||||
|
||||
use Drupal\Tests\BrowserTestBase;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class MyModuleTest extends BrowserTestBase {
|
||||
|
||||
protected $defaultTheme = 'stark';
|
||||
|
||||
protected static $modules = ['my_module'];
|
||||
|
||||
/** @test */
|
||||
public function the_front_page_loads_for_anonymous_users() {
|
||||
$this->drupalGet('<front>');
|
||||
|
||||
$this->assertResponse(Response::HTTP_OK);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue