Add Drupal Test Traits

This commit is contained in:
Oliver Davies 2025-06-10 20:47:23 +01:00
parent 7d8f0581c1
commit 7e45664407
3 changed files with 70 additions and 3 deletions

View file

@ -115,6 +115,7 @@
]
},
"require-dev": {
"drupal/core-dev": "^11.1"
"drupal/core-dev": "^11.1",
"weitzman/drupal-test-traits": "^2.5"
}
}

67
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "70c3d88d4f3ea3edcf181acd2a451c11",
"content-hash": "d08a9ed40d3ba12f5ad2396def6f45ef",
"packages": [
{
"name": "asm89/stack-cors",
@ -14089,6 +14089,71 @@
"source": "https://github.com/webflo/drupal-finder/tree/1.3.1"
},
"time": "2024-06-28T13:45:36+00:00"
},
{
"name": "weitzman/drupal-test-traits",
"version": "2.5.0",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/dtt.git",
"reference": "664201b00140f9b935fcb9f3eef012c6638ec0c5"
},
"dist": {
"type": "zip",
"url": "https://git.drupalcode.org/api/v4/projects/project%2Fdtt/repository/archive.zip?sha=664201b00140f9b935fcb9f3eef012c6638ec0c5",
"reference": "664201b00140f9b935fcb9f3eef012c6638ec0c5",
"shasum": ""
},
"require": {
"php": ">=8.1"
},
"conflict": {
"drupal/core": "<=10.2"
},
"require-dev": {
"drupal/mailsystem": "^4",
"drush/drush": "^12.5 || ^13",
"phpspec/prophecy-phpunit": "^2",
"webflo/drupal-finder": "^1.3.1"
},
"type": "library",
"extra": {
"drupal-scaffold": {
"locations": {
"web-root": "web/"
},
"file-mapping": {
"[project-root]/.gitignore": false,
"[project-root]/.editorconfig": false,
"[project-root]/.gitattributes": false
}
},
"installer-paths": {
"web/core": [
"type:drupal-core"
]
}
},
"autoload": {
"psr-4": {
"weitzman\\DrupalTestTraits\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Moshe Weitzman",
"email": "weitzman@tejasa.com"
}
],
"description": "Traits for testing Drupal sites that have user content (versus unpopulated sites).",
"support": {
"source": "https://git.drupalcode.org/project/dtt/-/tree/2.5.0"
},
"time": "2024-10-30T23:28:39+00:00"
}
],
"aliases": [],

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="web/core/tests/bootstrap.php"
bootstrap="vendor/weitzman/drupal-test-traits/src/bootstrap.php"
colors="true"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutOutputDuringTests="true"
@ -16,6 +16,7 @@
<php>
<ini name="error_reporting" value="32767"/>
<ini name="memory_limit" value="-1"/>
<env name="DTT_BASE_URL" value="http://localhost:8888"/>
<env name="SIMPLETEST_BASE_URL" value="http://localhost:8888"/>
<env name="SIMPLETEST_DB" value="sqlite://localhost//dev/shm/testing.sqlite"/>
<env name="BROWSERTEST_OUTPUT_BASE_URL" value=""/>