PHPonTraxTest
[ class tree: PHPonTraxTest ] [ index: PHPonTraxTest ] [ all elements ]

Source for file testenv.php

Documentation is available at testenv.php

  1. <?php
  2. /**
  3.  *  Environment for Trax regression tests
  4.  *
  5.  * (PHP 5)
  6.  *
  7.  * @package PHPonTraxTest
  8.  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  9.  * @copyright (c) Walter O. Haas 2006
  10.  * @version $Id: testenv.php 208 2006-05-28 17:59:55Z john $
  11.  * @author Walt Haas <haas@xmission.com>
  12.  */
  13.  
  14. //  Test whether this is the Pear installed environment or the
  15. //  development environment.  The comparison below will succeed in the
  16. //  development environment but fail in the installed environment
  17. //  because of symbol substitution by the Pear installer.
  18. if ('@PHP-DIR@' == '@'.'PHP-DIR'.'@'{
  19.     //  Development environment
  20.     define("TRAX_LIB_ROOT"dirname(dirname(__FILE__))
  21.             . DIRECTORY_SEPARATOR 'vendor'
  22.            . DIRECTORY_SEPARATOR 'trax');
  23. else {
  24.     //  Pear installed environment
  25.     define("TRAX_LIB_ROOT""@PHP-DIR@"
  26.            . DIRECTORY_SEPARATOR 'PHPonTrax'
  27.            . DIRECTORY_SEPARATOR 'vendor'
  28.            . DIRECTORY_SEPARATOR 'trax');
  29. }
  30. ini_set('include_path''.' PATH_SEPARATOR
  31.         . dirname(__FILE__PATH_SEPARATOR
  32.         . TRAX_LIB_ROOT PATH_SEPARATOR ini_get('include_path'));
  33.  
  34. define('TRAX_TEST'true);
  35.  
  36. # Bootstrap the Trax environment, framework, and default configuration
  37. include_once(dirname(dirname(__FILE__))
  38.              . DIRECTORY_SEPARATOR 'config'
  39.              . DIRECTORY_SEPARATOR 'boot.php');
  40.  
  41. // -- set Emacs parameters --
  42. // Local variables:
  43. // tab-width: 4
  44. // c-basic-offset: 4
  45. // c-hanging-comment-ender-p: nil
  46. // indent-tabs-mode: nil
  47. // End:
  48. ?>

Documentation generated on Mon, 21 May 2007 22:29:17 -0600 by phpDocumentor 1.3.2