1. sfTestBrowser.class.php
  2. /** * sfTestBrowser simulates a browser which can test a symfony application. * * sfTestFunctional is backward compatible class for symfony 1.0, and 1.1. * For new code, you can use the sfTestFunctional class directly. * * @package symfony * @subpackage test * @author Fabien Potencier * @version SVN: $Id: sfTestBrowser.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $ */
  3. class sfTestBrowser extends sfTestFunctional
  4. {
  5. /**
  6. * Initializes the browser tester instance.
  7. *
  8. * @param string $hostname Hostname to browse
  9. * @param string $remote Remote address to spook
  10. * @param array $options Options for sfBrowser
  11. */
  12. public function __construct($hostname = null, $remote = null, $options = array())
  13. {
  14. if (is_object($hostname))
  15. {
  16. // new signature
  17. parent::__construct($hostname, $remote);
  18. }
  19. else
  20. {
  21. $browser = new sfBrowser($hostname, $remote, $options);
  22. if (null === self::$test)
  23. {
  24. $lime = new lime_test(null, isset($options['output']) ? $options['output'] : null);
  25. }
  26. else
  27. {
  28. $lime = null;
  29. }
  30. parent::__construct($browser, $lime);
  31. }
  32. }
  33. }

Debug toolbar