feat(nvim): add Phpactor templates for Drupal tests
This commit is contained in:
parent
fdd48ba14d
commit
1e22556f6a
4
config/phpactor/phpactor.yml
Normal file
4
config/phpactor/phpactor.yml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
code_transform.class_new.variants:
|
||||||
|
drupal-functional-test: drupal-functional-test
|
||||||
|
drupal-kernel-test: drupal-kernel-test
|
||||||
|
drupal-unit-test: drupal-unit-test
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace {{ prototype.namespace }};
|
||||||
|
|
||||||
|
use Drupal\Tests\BrowserTestBase;
|
||||||
|
|
||||||
|
{% for class in prototype.classes %}
|
||||||
|
final class {{ class.name }} extends BrowserTestBase {
|
||||||
|
|
||||||
|
public $defaultTheme = 'stark';
|
||||||
|
|
||||||
|
public static $modules = [];
|
||||||
|
|
||||||
|
public function setUp(): void {
|
||||||
|
parent::setUp();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
{% endfor %}
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace {{ prototype.namespace }};
|
||||||
|
|
||||||
|
use Drupal\KernelTests\KernelTestBase;
|
||||||
|
|
||||||
|
{% for class in prototype.classes %}
|
||||||
|
final class {{ class.name }} extends KernelTestBase {
|
||||||
|
|
||||||
|
public static $modules = [];
|
||||||
|
|
||||||
|
protected $strictConfigSchema = FALSE;
|
||||||
|
|
||||||
|
public function setUp(): void {
|
||||||
|
parent::setUp();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
{% endfor %}
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace {{ prototype.namespace }};
|
||||||
|
|
||||||
|
use Drupal\Tests\UnitTestCase;
|
||||||
|
|
||||||
|
{% for class in prototype.classes %}
|
||||||
|
final class {{ class.name }} extends UnitTestCase {
|
||||||
|
|
||||||
|
}
|
||||||
|
{% endfor %}
|
|
@ -236,4 +236,9 @@ in
|
||||||
source = ../../config/neovim;
|
source = ../../config/neovim;
|
||||||
recursive = true;
|
recursive = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xdg.configFile.phpactor = {
|
||||||
|
source = ../../config/phpactor;
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue