dof-dss / nidirect-d8-test-install-profile
NI Direct 的单元测试安装配置文件
Requires
- composer/installers: ^1.6
Requires (Dev)
- drupal/coder: ^8.3
This package is auto-updated.
Last update: 2024-08-29 05:24:42 UTC
README
NIDirect Drupal 8 测试安装配置文件
NIDirect 网站的 Drupal 源代码: https://www.nidirect.gov.uk.
入门指南
此仓库应克隆到正在运行的 Drupal 8 NIDirect 网站的 /web/profiles 目录中
git clone git@svegit01.thestables.net:dss/nidirect-d8-test-install-profile.git custom
(执行此操作后,您应该在项目中的 'web/profiles/custom/test_profile' 目录中)
更新安装配置文件
只需将当前配置导出到安装配置文件目录,如下所示
lando drush config-export --destination=profiles/custom/test_profile/config/sync
执行此操作后,编辑 profiles/custom/test_profile/config/sync/core.extension.yml 并确保安装配置文件设置为 'test_profile' 而不是 'standard'。请注意,这可能在文件的底部涉及两个更改,如下面的 core.extension.yml 文件末尾的示例所示
test_profile: 1000
theme:
stable: 0
classy: 0
bartik: 0
seven: 0
stark: 0
profile: test_profile
_core:
default_config_hash: R4IF-ClDHXxblLcG0L7MgsLvfBIMAvi_skumNFQwkDc
运行单元测试
首先,确保您的 SIMPLETEST_BASE_URL 在 lando config/phpunit.lando.xml
文件中设置为本地站点 URL(这应该由 Lando 构建脚本自动设置,但在遇到问题时应进行检查)
在 lando(通过 ssh 连接)中的 /app/drupal8/web/core
目录中运行以下命令
../../vendor/bin/phpunit ../modules/custom/nidirect_common/tests/src/Functional/DrivingInstructorTest.php