WebTestCase.php 675 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * Change the following URL based on your server configuration
  4. * Make sure the URL ends with a slash so that we can use relative URLs in test cases
  5. */
  6. define('TEST_BASE_URL','http://localhost/testdrive/index-test.php/');
  7. /**
  8. * The base class for functional test cases.
  9. * In this class, we set the base URL for the test application.
  10. * We also provide some common methods to be used by concrete test classes.
  11. */
  12. class WebTestCase extends CWebTestCase
  13. {
  14. /**
  15. * Sets up before each test method runs.
  16. * This mainly sets the base URL for the test application.
  17. */
  18. protected function setUp()
  19. {
  20. parent::setUp();
  21. $this->setBrowserUrl(TEST_BASE_URL);
  22. }
  23. }