title: How to assert the current URL?
body: <p>I'm unittesting my Yii application with <code>PHPUnit</code> and <code>Selenium-server</code>. </p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>class StartSurveyRedirectTest extends WebTestCase
  {
    public $fixtures=array(
      'sessions'=&gt;'SurveySession',
      'surveys' =&gt; 'Survey',
    );
  
    public function testActive() {
      $survey = $this-&gt;surveys('survey_active');
      $user_id = 1;
      $imid = 'nl1234-9876';
      $this-&gt;open('veldwerk/survey/redirect?survey_id=' . $survey-&gt;survey_id . 
          '&amp;user_id=' . $user_id . 
          '&amp;imid=' . $imid . 
          '&amp;' . $survey-&gt;security_parameter_name . '=' . $survey-&gt;getSecurityParameterValue()
      );
  
      //assert if redirected
      $this-&gt;assertNotEquals($this-&gt;url(),TEST_BASE_URL . 
          'veldwerk/survey/redirect?survey_id=' . $survey-&gt;survey_id . 
          '&amp;user_id=' . $user_id . 
          '&amp;imid=' . $imid . 
          '&amp;' . $survey-&gt;security_parameter_name . '=' . $survey-&gt;getSecurityParameterValue()
      );
    }
  }
  </code></pre>
  
  <p>The result when I start the test:</p>
  
  <pre><code>There was 1 error:
  
  1) StartSurveyRedirectTest::testActive
  
  Method url not defined.
  
  D:\workspace\Pi\framework\test\CWebTestCase.php:63
  D:\workspace\Pi\protected\tests\functional\StartSurveyRedirectTest.php:27
  D:\workspace\Pi\protected\tests\functional\StartSurveyRedirectTest.php:27
  
  Caused by
  BadMethodCallException: Method url not defined.
  
  D:\workspace\Pi\framework\test\CWebTestCase.php:63
  D:\workspace\Pi\protected\tests\functional\StartSurveyRedirectTest.php:27
  D:\workspace\Pi\protected\tests\functional\StartSurveyRedirectTest.php:27
  </code></pre>
  
  <p>So what I really want to test is if the user has been redirected. I thought the easiest way was to check the URL but it turns out it doesn't work? While in the selenium docs and PHPUnit docs says it can..</p>
  
  <p>Does the Yii framework does not support this? Or am I doing something wrong?</p>