开发者

Error in sample functional tests with Yii

Recently I've discovered Yii framework and started learning it. I've generated app skeleton using yiic tool, installed PHPUnit, SeleniumRC and attempted to run functional tests provided by skeleton app (I didn'开发者_高级运维t change anything).

> phpunit functional/SiteTest.php

Report said following:

There was 1 error:
1) SiteTest::testLoginLogout
PHPUnit_Framework_Exception: Response from Selenium RC server for testComplete().
ERROR: Element link=Logout not found.

I found that there was a 'Logout (demo)' link, not just 'Logout'. If I change php code in testcase, all tests pass ok. Is it error of Yii developers or am I missing something?


Yii 1.1.6 fixes this bug.

if($this->isTextPresent('Logout'))
    $this->clickAndWait('link=Logout');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜