定制 drunomics/behat-drupal-utils 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

drunomics/behat-drupal-utils

最新稳定版本:2.10.3

Composer 安装命令:

composer require drunomics/behat-drupal-utils

包简介

Provides behat step definitinons, contexts and utilities for using Behat with Drupal.

README 文档

README

Dependencies:

  • Behat
  • Drupal
  • Drupal Extension
  • Behat Driver with Javascript enabled (e.g. dmore/behat-chrome-extension)

The javascript step definitions are all tested with dmore/behat-chrome-extension.

Overview:

The package provides:

  • Various useful behat contexts, organized the following context classes:

    • DrupalUtilsApiContext
    • DrupalUtilsDrushContext
    • MinkUtilsContext
    • HttpHeadersContext

    Depending on your behat configuration, the suiting context classes should be added in. It automatically includes all compatible step definitions.

  • Optional additional context classes that add automatic checks or cleanup routines like:

    • DrupalCleanTestContentApiContext
    • DrupalErrorCheckApiContext

Smoke tests

The tests below ./examples/ ensure a simple Drupal login/logout works and a page of your site can be opened, while frontend assets are loaded and no javascript or watchdog errors are triggered.

Setup

  • Add this package to your project's dev dependencies.
  • Add one of the three context to your behat.yml, optionall also add optional contexts.
  • Feel free to copy the example behat features.
  • Add the provided js file to your sites js. The listener is required to catch js errors.

Detecting watchdog errors

Default behaviour

When DrupalErrorCheckApiContext is added, all watchdog entries excluding Notice, Info and Debug will be detected and trigger PHP errors in the behat PHP runner automatically.

Adjusting watchdog entries severity to NOTICE level

To change the error detection severity to NOTICE set the fail_on_notice parameter in the behat.yml to TRUE.

contexts:
  - drunomics\BehatDrupalUtils\Context\DrupalErrorCheckApiContext:
      fail_on_notice: TRUE

Credits

developed by drunomics GmbH, hello@drunomics.com Please refer to the commit log individual contributors.

统计信息

  • 总下载量: 44.02k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2018-04-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固