Skip to content
Snippets Groups Projects
Commit 1bb828b8 authored by jurgenhaas's avatar jurgenhaas
Browse files

Merge remote-tracking branch 'origin/develop' into develop

parents a441292c 65823698
No related branches found
No related tags found
1 merge request!18Merging develop into main
Pipeline #1181884 passed with warnings
include:
- project: 'gitlab-ci-cd/composer-packages'
- project: 'gitlab-ci-cd/drupal'
ref: main
file: '/composer-packages.yml'
file: '/private-modules.yml'
......@@ -35,12 +35,6 @@
"source": "https://gitlab.lakedrops.com/composer/plugin/drupal-development-environment/tree/main",
"docs": "https://devops-tools.docs.lakedrops.com/composer/plugin/drupal-dev-environment/"
},
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
}
],
"require": {
"php": ">=8.1",
"composer-plugin-api": "^2",
......@@ -76,8 +70,11 @@
"composer/composer": "^2",
"roave/security-advisories": "dev-latest"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"allow-plugins": {
"lakedrops/*": false
}
},
"autoload": {
"psr-4": {
"LakeDrops\\DrupalDevelopmentEnvironment\\": "src/"
......@@ -85,14 +82,5 @@
},
"extra": {
"class": "LakeDrops\\DrupalDevelopmentEnvironment\\Plugin"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"drupal/core-composer-scaffold": false,
"lakedrops/*": false,
"php-http/discovery": false,
"phpstan/extension-installer": true
}
}
}
......@@ -75,11 +75,10 @@ class Plugin extends BasePlugin {
* The event that triggered the plugin.
*/
public function prepareProject(Event $event): void {
/** @var Handler $handler */
/** @var \LakeDrops\DrupalDevelopmentEnvironment\Handler $handler */
$handler = $this->handler;
$handler
->setEvent($event)
->setupLakeDropsProject();
$handler->setEvent($event);
$handler->setupLakeDropsProject();
}
}
......@@ -12,6 +12,13 @@ use Drupal\Tests\TestSuites\TestSuiteBase;
*/
abstract class Base extends TestSuiteBase {
/**
* Unused variable to allow for otherwise useless __construct overrides.
*
* @var string
*/
protected string $internalTestType;
/**
* Finds extensions in a Drupal installation.
*
......
......@@ -9,13 +9,21 @@ require_once __DIR__ . '/Base.php';
*/
class Functional extends Base {
/**
* {@inheritdoc}
*/
final public function __construct($theClass = '', string $name = '') {
parent::__construct($theClass, $name);
$this->internalTestType = 'functional';
}
/**
* Factory method which loads up a suite with all functional tests.
*
* @return static
* The test suite.
*/
public static function suite(): Functional {
public static function suite(): static {
$root = dirname(__DIR__, 5) . '/web';
$suite = new static('functional');
......
......@@ -9,13 +9,21 @@ require_once __DIR__ . '/Base.php';
*/
class FunctionalJavascript extends Base {
/**
* {@inheritdoc}
*/
final public function __construct($theClass = '', string $name = '') {
parent::__construct($theClass, $name);
$this->internalTestType = 'functional javascript';
}
/**
* Factory method which loads up a suite with all functional tests.
*
* @return static
* The test suite.
*/
public static function suite(): FunctionalJavascript {
public static function suite(): static {
$root = dirname(__DIR__, 5) . '/web';
$suite = new static('functional-javascript');
......
......@@ -9,13 +9,21 @@ require_once __DIR__ . '/Base.php';
*/
class Kernel extends Base {
/**
* {@inheritdoc}
*/
final public function __construct($theClass = '', string $name = '') {
parent::__construct($theClass, $name);
$this->internalTestType = 'kernel';
}
/**
* Factory method which loads up a suite with all unit tests.
*
* @return static
* The test suite.
*/
public static function suite(): Kernel {
public static function suite(): static {
$root = dirname(__DIR__, 5) . '/web';
$suite = new static('kernel');
......
......@@ -9,13 +9,21 @@ require_once __DIR__ . '/Base.php';
*/
class Unit extends Base {
/**
* {@inheritdoc}
*/
final public function __construct($theClass = '', string $name = '') {
parent::__construct($theClass, $name);
$this->internalTestType = 'unit';
}
/**
* Factory method which loads up a suite with all unit tests.
*
* @return static
* The test suite.
*/
public static function suite(): Unit {
public static function suite(): static {
$root = dirname(__DIR__, 5) . '/web';
$suite = new static('unit');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment