PHP-Behat-页面对象扩展-致命错误:未被捕获的ArgumentCountError:函数FeatureContext :: __ construct()的参数太少了>

问题描述 投票:0回答:1

[尝试实现behat-page-object-extension,并且在运行behat时出现以下错误:致命错误:Uncaught ArgumentCountError:函数FeatureContext :: __ construct()的参数太少了>>

用于项目的Github-> https://github.com/andrew0071/MyBehatProject

composer.json

enter image description here

behat.yml

enter image description here

Homepage.php

enter image description here

FeatureContext.php

将页面对象注入上下文文件如果将页面对象定义为带有类型提示的构造函数参数,则会将它们直接注入到上下文文件中:enter image description here

test.feature.php

enter image description here

运行测试时

enter image description here

试图实现behat-page-object-extension,并且在运行behat时出现以下错误:致命错误:Uncaught ArgumentCountError:函数FeatureContext :: ...的参数太少了]

您的behat.yml全部搞砸了。 YAML中的缩进很重要。

php ui-automation behat
1个回答
0
投票

您的behat.yml全部搞砸了。 YAML中的缩进很重要。

© www.soinside.com 2019 - 2024. All rights reserved.