adamquaile/behat-table-parser
Composer 安装命令:
composer require adamquaile/behat-table-parser
包简介
README 文档
README
More fluent API for behat TableNodes.
Experimental. Need to implement sensible way of better integrating into context classes.
Usage
Tables used for single entities or key-value pairs:
Given there is a table like this:
| Key1 | Value1 |
| Key2 | Value2 |
And a context method like this:
public function thereIsATableLikeThis(TableNode $table)
{
$table = (new SingleEntryTable($table))
->requires('Key1')
;
$table->get('Key1');
}
(To be implemented next) Tables used for multiple entities:
Given there is a table like this:
| Key1 | Key 2 | Key 3 |
| 1st Value 1 | 1st Value 2 | 1st Value 3 |
| 2nd Value 1 | 2nd Value 2 | 2nd Value 3 |
| 3rd Value 1 | 3rd Value 2 | 3rd Value 3 |
And a context method like this:
public function thereIsATableLikeThis(TableNode $table)
{
$table = (new MultipleEntityTable($table))
->requires('Key1')
->requires('Key2')
;
$table->each(function() { ... });
$table->row(0)->get('Key1')
}
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2015-02-21