Initial Drupal 11 with DDEV setup
This commit is contained in:
44
vendor/chi-teck/drupal-code-generator/templates/Test/_browser/browser.twig
vendored
Normal file
44
vendor/chi-teck/drupal-code-generator/templates/Test/_browser/browser.twig
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Drupal\Tests\{{ machine_name }}\Functional;
|
||||
|
||||
use Drupal\Tests\BrowserTestBase;
|
||||
use PHPUnit\Framework\Attributes\Group;
|
||||
|
||||
/**
|
||||
* Test description.
|
||||
*/
|
||||
#[Group('{{ machine_name }}')]
|
||||
final class {{ class }} extends BrowserTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $defaultTheme = 'claro';
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected static $modules = ['{{ machine_name }}'];
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
// Set up the test here.
|
||||
}
|
||||
|
||||
/**
|
||||
* Test callback.
|
||||
*/
|
||||
public function testSomething(): void {
|
||||
$admin_user = $this->drupalCreateUser(['administer site configuration']);
|
||||
$this->drupalLogin($admin_user);
|
||||
$this->drupalGet('/admin/config/system/site-information');
|
||||
$this->assertSession()->elementExists('xpath', '//h1[text() = "Basic site settings"]');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user