ivangrynenko / behat-steps
Behat 特性的集合
0.2
2020-02-04 21:20 UTC
Requires
- behat/behat: ^3
Requires (Dev)
- cweagans/composer-patches: ^1.6.0
- dealerdirect/phpcodesniffer-composer-installer: ^0.5
- drupal/coder: ^8.2.12
- drupal/drupal-extension: ^v3.4
- integratedexperts/behat-format-progress-fail: ^0.2
- integratedexperts/behat-screenshot: ^0.7
- jakub-onderka/php-parallel-lint: ^1.0
- phpcompatibility/php-compatibility: ^9.0
- phpunit/phpunit: ^4.8.36
This package is auto-updated.
Last update: 2024-09-05 06:37:14 UTC
README
为 Drupal 8 和 Drupal 7 开发收集的 Behat 步骤。
为什么使用特性?
通常,此类包实现自己的 Drupal 驱动程序,包含多个上下文、服务容器和其他许多有用的架构结构。但对于这个简单的库,使用特性有助于降低使用、维护和支持的门槛。这个包将来可能被重构以使用适当的架构。
安装
composer require --dev ivangrynenko/behat-steps
使用
在 `composer.json` 中
"autoload": {
"psr-4": {
"ivangrynenko\\BehatSteps\\": "src/"
}
},
在 FeatureContext.php
中
<?php
use ivangrynenko\BehatSteps\IgContentTrait;
use ivangrynenko\BehatSteps\FileTrait;
use ivangrynenko\BehatSteps\FormElementsTrait;
/**
* Defines application features from the specific context.
*/
class FeatureContext extends DrupalContext {
use IgContentTrait;
use FieldTrait;
use FormElementsTrait;
}
异常
- 对于所有断言抛出
\Exception
。 - 对于步骤中的任何未满足的要求,抛出
\RuntimeException
。