2011-07-08 160 views
1
You can implement step definitions for undefined steps with these snippets: 

/** 
* @Given /^people enter (\d+)$/ 
*/ 
public function peopleEnter($argument1) 
{ 
    throw new Pending(); 
} 

我應該把它放在bootstrap.php下嗎?我真的很困惑我應該怎麼知道... 我想使用oop風格,而不是關閉。 我是新來的BDD和Behat。 歡迎任何幫助。 謝謝使用Behat 2.0,我應該把我的步驟放在哪裏?

回答

0

是的,把它放在Bootstrap中。默認情況下,Behat會將bootstrap/FeatureContext.php作爲其引導文件,但這些方法應該放入您正在使用的任何引導類中,這些類將擴展爲BehatContext

相關問題