小编Gen*_*eck的帖子

在Gherkin写一个"当时那时候给予时"的测试是否可以接受?

在Gherkin写一个"当时那时候给予时"的测试是否可以接受?一个真实的例子如下AllPlayers.com

Scenario: Successfully register a user
  Given I am on homepage
    And I am not logged into an account
  When I follow "create a new account"
    And I fill in "First Name" with "Bobby"
    And I fill in "Last Name" with "Bricks"
    And I fill in "E-mail" with "bbricks@example.com"
    And I select "Jun" from "Birthday Month"
    And I select "22" from "Birthday Day"
    And I select "1985" form "Birthday Year"
    And I select "Male" from "Gender"
    And I fill in …
Run Code Online (Sandbox Code Playgroud)

testing bdd gherkin

22
推荐指数
3
解决办法
1万
查看次数

有没有办法判断--debug或--verbose是否在测试中传递给PHPUnit?

我正在做一些重载到使用CaptureEntirePageScreenshotToString函数的PHPUnit的Selenium扩展,我想只打印截图的路径,因为我们只在传递--verbose或--debug时才去.

例如, phpunit --debug ./tests

然后在我的代码中的某处(这是psudo代码)

if (--debug)
  echo "Screenshot: /path/to/screenshot.png
Run Code Online (Sandbox Code Playgroud)

建议?

php phpunit

9
推荐指数
1
解决办法
742
查看次数

如何在Zend Framework中将URL作为URL的参数传递?

我的问题源于我向用户发送电子邮件,其中包含以下内容:

http://mydomain.net/login/index/dest/%2Finvitation%2Fconfirm%2Fconfirmation_key%2F15116b5e4c61e4111ade679c10b3bf27

正如您所看到的,我要做的是将URL作为参数"dest"传递,以便登录页面知道用户登录后的重定向位置.但是,我看到了以下内容:

404 Not Found  - /login/index/dest //邀请/确认/确认_key/15116b5e4c61e4111ade679c10b3bf27

这是我用来创建电子邮件的视图:

<p>
<?if($this->invitation->user):?>
<a href='<?=$this->serverUrl($this->baseUrl().$this->url(array(
    'action'=>'index',
    'controller'=>'login',
    'dest'=>$this->url(array(
        'action'=>'confirm',
        'controller'=>'invitation',
        'confirmation_key'=>$this->invitation->confirmation_key
    ))
)));?>'>Log in to confirm this invitation.</a>

//The view continues...
Run Code Online (Sandbox Code Playgroud)

关于如何防止将URI编码的项目翻译成其文字值的任何想法都将非常感激.

php zend-framework zend-framework-mvc

3
推荐指数
1
解决办法
366
查看次数