Move all files to docs/

This commit is contained in:
Oliver Davies 2025-10-02 08:13:01 +01:00
parent 354fbe4128
commit 39acad502c
32 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,5 @@
name: My Module
type: module
core: 8.x
core_version_requirement: ^8 || ^9
package: Custom

View file

@ -0,0 +1,39 @@
<?php
namespace Drupal\Tests\my_module\Functional;
use Drupal\Tests\BrowserTestBase;
use Symfony\Component\HttpFoundation\Response;
class MyModuleTest extends BrowserTestBase {
protected $defaultTheme = 'stark';
/** @test */
public function the_front_page_loads_for_anonymous_users() {
$this->drupalGet('<front>');
$this->assertResponse(Response::HTTP_OK);
}
/** @test */
public function the_admin_page_is_not_accessible_to_anonymous_users() {
$this->drupalGet('admin');
$this->assertResponse(Response::HTTP_FORBIDDEN);
}
/** @test */
public function the_admin_page_is_accessible_by_admin_users() {
$adminUser = $this->createUser([
'access administration pages',
]);
$this->drupalLogin($adminUser);
$this->drupalGet('/admin');
$this->assertResponse(Response::HTTP_OK);
}
}