realtime.eu / behat-sfk
该软件包最新版本(v1.0.0)的许可证信息不可用。
为Behat提供SFK功能
v1.0.0
2015-04-01 18:03 UTC
Requires
- php: >=5.3.0
- behat/behat: >=2.4.0
- symfony/config: >=2.0.0,<3.0.0
- symfony/dependency-injection: >=2.0.0,<3.0.0
This package is not auto-updated.
Last update: 2024-09-28 15:11:58 UTC
README
瑞士文件刀文件树处理器 - Behat扩展
这是我创建的一个Behat扩展,用于测试一些PHP代码与FTP服务器。目前,这个扩展仅与ftpserv命令进行了测试。
安装方法
-
将 Realtime\SfkBehat\Extension 包含在您的behat配置文件中作为扩展,请参阅:http://docs.behat.org/guides/7.config.html#extensions
-
添加为子上下文
$this->useContext('subcontext_alias', new \Realtime\SfkBehat\Context());
步骤
给定一个FTP服务器
Given a local FTP server running on port "PORT" with these options "JSON_MAP"
-or-
Given a local FTP server running on port "PORT" with these options:
"""
JSON_MAP
"""
PORT = 运行FTP服务器的目标端口,例如默认端口21。 JSON_MAP = JSON键 > 值对象,包含以下选项
{
"username" : "jeff", // run ftp server with this username
"password" : "p@sw0rd", // run ftp server with this password
"pasv_ip" : "127.0.0.1" // return this ip adres in PASV response
(default returns the first network interface IP found)
}
断言FTP上传的文件
Then FTPed file "NAME" must be created, containing:
"""
CONTENT
"""
NAME = 上传文件的名称。 CONTENT = 上传文件的内容。