
| Current Path : /var/www/html/store1/vendor/chi-teck/drupal-code-generator/src/Command/Test/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/store1/vendor/chi-teck/drupal-code-generator/src/Command/Test/WebDriver.php |
<?php declare(strict_types=1);
namespace DrupalCodeGenerator\Command\Test;
use DrupalCodeGenerator\Application;
use DrupalCodeGenerator\Command\ModuleGenerator;
/**
* Implements test:webdriver command.
*/
final class WebDriver extends ModuleGenerator {
protected string $name = 'test:webdriver';
protected string $description = 'Generates a test that supports JavaScript';
protected string $alias = 'webdriver-test';
protected string $label = 'WebDriver';
protected string $templatePath = Application::TEMPLATE_PATH . '/test/webdriver';
/**
* {@inheritdoc}
*/
protected function generate(array &$vars): void {
$this->collectDefault($vars);
$vars['class'] = $this->ask('Class', 'ExampleTest', '::validateRequiredClassName');
$this->addFile('tests/src/FunctionalJavascript/{class}.php', 'webdriver');
}
}