punktde / codeception-filesystem
此包提供用于Codeception测试的模块和Gherkin步骤定义
3.2.0
2024-04-24 15:14 UTC
Requires
This package is auto-updated.
Last update: 2024-08-25 09:17:16 UTC
README
Codeception Filesystem模块的Gherkin步骤和附加模块函数
如何使用
扩展模块
在您的 codeception.yaml
中使用模块 PunktDe\Codeception\Filesystem\Module\Filesystem
代替默认的codeception模块 filesystem
modules:
enabled:
- PunktDe\Codeception\Filesystem\Module\Filesystem
Gherkin步骤
只需将特质 PunktDe\Codeception\Filesystem\ActorTraits\Filesystem
添加到您的测试演员中。然后您可以使用带有新步骤的 *.feature
文件编写Gherkin测试。
示例演员
<?php
/*
* (c) 2018 punkt.de GmbH - Karlsruhe, Germany - http://punkt.de
* All rights reserved.
*/
/**
* Inherited Methods
* @method void wantToTest($text)
* @method void wantTo($text)
* @method void execute($callable)
* @method void expectTo($prediction)
* @method void expect($prediction)
* @method void amGoingTo($argumentation)
* @method void am($role)
* @method void lookForwardTo($achieveValue)
* @method void comment($description)
* @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL)
*
* @SuppressWarnings(PHPMD)
*/
class AcceptanceTester extends \Codeception\Actor
{
use _generated\AcceptanceTesterActions;
use \PunktDe\Codeception\Filesystem\ActorTraits\Filesystem; // use the filesystem steps trait
}
有哪些步骤?
要获取所有可用步骤,您只需运行以下命令
vendor/bin/codecept -c path/to/codeception.yaml gherkin:steps suiteName
这将提供一个包含所有可用步骤的表格。