Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
 
3
require_once(dirname(__FILE__).'/../vendor/lime/lime.php');
4
 
5
/*
6
 * This file is part of the symfony package.
7
 * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
 
13
/**
14
 * sfTestBrowser simulates a browser which can test a symfony application.
15
 *
16
 * sfTestFunctional is backward compatible class for symfony 1.0, and 1.1.
17
 * For new code, you can use the sfTestFunctional class directly.
18
 *
19
 * @package    symfony
20
 * @subpackage test
21
 * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
22
 * @version    SVN: $Id: sfTestBrowser.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
23
 */
24
class sfTestBrowser extends sfTestFunctional
25
{
26
  /**
27
   * Initializes the browser tester instance.
28
   *
29
   * @param string $hostname  Hostname to browse
30
   * @param string $remote    Remote address to spook
31
   * @param array  $options   Options for sfBrowser
32
   */
33
  public function __construct($hostname = null, $remote = null, $options = array())
34
  {
35
    if (is_object($hostname))
36
    {
37
      // new signature
38
      parent::__construct($hostname, $remote);
39
    }
40
    else
41
    {
42
      $browser = new sfBrowser($hostname, $remote, $options);
43
 
44
      if (null === self::$test)
45
      {
46
        $lime = new lime_test(null, isset($options['output']) ? $options['output'] : null);
47
      }
48
      else
49
      {
50
        $lime = null;
51
      }
52
 
53
      parent::__construct($browser, $lime);
54
    }
55
  }
56
}