behat/debug-extension 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

behat/debug-extension

最新稳定版本:1.0

Composer 安装命令:

composer require behat/debug-extension

包简介

Debug Behat scenarios and print any information to command line

README 文档

README

Print any information you'd like to a command line during the test suite execution.

Build Status Coverage Status Quality Score Total Downloads Latest Stable Version License

Usage

Add @debug tag to your feature definition:

@debug Feature: Test Scenario: Test  # ...

Add extension to your configuration file:

default: extensions: Behat\DebugExtension: ~

Extend your object with a trait:

use Behat\DebugExtension\Debugger; class Example { use Debugger; }

Use the debug method wherever you like:

public function method() { // ... self::debug([ 'Function arguments: %s', 'Second line', ], [ var_export(func_get_args(), true), ]); // ... }

As you can see the debug method processed by sprintf() function, so second argument for a method is an array of placeholders.

Messages

Also, with this extension, you able to print styled messages to a command line.

new \Behat\DebugExtension\Message('comment', 2, [ 'This is a first line of a message that will be printed to a command line.', 'Read documentation for this class to know how to use it.', ]);

Programmatic usage

export BEHAT_DEBUG=true

This environment variable tells that messages should be printed in any way.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固