0

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?

4
  • any chance we can see your test code for around that? Commented Oct 20, 2010 at 15:20
  • in protected/tests/functional/SiteTest.php, line 44: $this->clickAndWait('link=Logout'); should be $this->clickAndWait('link=Logout (demo)'); Commented Oct 21, 2010 at 4:45
  • 1
    If you fixed it, you should make your comment an answer galymzhan. :) Commented Oct 21, 2010 at 16:07
  • Please report it here so we'll not forget to fix it. Commented Mar 17, 2011 at 8:59

1 Answer 1

1

Yii 1.1.6 fixes this bug.

if($this->isTextPresent('Logout'))
    $this->clickAndWait('link=Logout');
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.