thunder/thunder-develop

thunder 开发项目。

安装: 120

依赖: 0

建议: 0

安全: 0

星标: 2

关注者: 4

分支: 1

开放问题: 4

类型:项目

1.0.3 2019-09-10 07:08 UTC

README

要安装开发版的 Thunder 发行版,请创建 thunder-develop 项目

composer create-project thunder/thunder-develop --keep-vcs --no-install -s dev
cd thunder-develop

Ddev 环境

启动 ddev 环境以进行本地站点安装

ddev start

安装站点。由于使用了 composer merge 插件来合并发行版的依赖,如果从未运行过 composer update,则必须运行两次。如果之前已经构建了 docroot,则不需要这样做。

ddev composer update
ddev composer update
ddev drush si thunder

要在发行版上工作,请在 docroot/profiles/contrib/thunder 文件夹内工作。

cd docroot/profiles/contrib/thunder
git checkout -b feature/new-thunder-feature # <-- this will be a branch in the distribution not the project
<make changes>
git commit .

运行代码风格测试

要测试发行版中的代码风格(Drupal 和 DrupalPractice),请运行

ddev composer cs

要测试某些模块,请运行

ddev composer cs docroot/modules/contrib/mymodule

您也可以运行 phpcbf

ddev composer cbf

测试

某些测试需要在 selenium 容器中包含测试样本。要复制当前样本,请运行

docker cp docroot/profiles/contrib/thunder/tests/fixtures ddev-thunder-develop-selenium-chrome:/fixtures

运行所有 Thunder 测试

ddev composer exec -- phpunit -c docroot/core docroot/profiles/contrib/thunder

运行单个测试文件(例如 ArticleSchedulerIntegrationTest.php)

ddev composer exec -- phpunit -c docroot/core --filter=ArticleSchedulerIntegrationTest docroot/profiles/contrib/thunder

运行单个测试方法(例如 CacheInvalidationTest::testMetatagsCacheInvalidation)

ddev composer exec -- phpunit -c docroot/core --filter=testEntityListCacheInvalidation docroot/profiles/contrib/thunder/modules

运行模块测试

ddev composer exec -- phpunit -c docroot/core docroot/modules/contrib/graphql