Current file: /home/greg/workspace/PHPDS-dev-trunk/PHPDevShell/stable/trunk/other/tests/unittests/framework/bootstrap.php
Legend: executed not executed dead code

  Coverage
  Classes Functions / Methods Lines
Total
100.00%100.00%
100.00% 1 / 1
100.00%100.00%
100.00% 3 / 3 CRAP
100.00%100.00%
100.00% 8 / 8
 
PHPDSlib
100.00%100.00%
100.00% 1 / 1
100.00%100.00%
100.00% 3 / 3
100.00%100.00%
100.00% 8 / 8
 __construct()
100.00%100.00%
100.00% 1 / 1 1
100.00%100.00%
100.00% 2 / 2
 instance()
100.00%100.00%
100.00% 1 / 1 2
100.00%100.00%
100.00% 4 / 4
 config()
100.00%100.00%
100.00% 1 / 1 1
100.00%100.00%
100.00% 2 / 2


       1                 : <?php                                                                                                                                   
       2                 :                                                                                                                                         
       3                 :     //require_once 'PHPUnit/Framework.php';                                                                                             
       4                 :                                                                                                                                         
       5                 :     date_default_timezone_set('America/Los_Angeles'); // this is stupid, but *required* by PHP :(   TODO: make it better! if possible...
       6                 :                                                                                                                                         
       7                 :     $my_path = 'other/tests/unittests/framework';                                                                                       
       8                 :     $basepath = realpath(substr(__FILE__, 0, strripos(__FILE__, $my_path)));                                                            
       9                 :     define('BASEPATH', $basepath.'/');                                                                                                  
      10                 :                                                                                                                                         
      11                 :     $path = ini_get('include_path').PATH_SEPARATOR.__FILE__.PATH_SEPARATOR.BASEPATH;                                                    
      12                 :     $includes = array('/includes/', '/includes/legacy/', '/includes/local', '/includes/models');                                        
      13                 :     foreach($includes as $partialpath) $path .= PATH_SEPARATOR.realpath(BASEPATH.$partialpath);                                         
      14                 :     ini_set('include_path', $path);                                                                                                     
      15                 :                                                                                                                                         
      16                 :                                                                                                                                         
      17                 :     $_SERVER['SERVER_NAME'] = 'TEST';                                                                                                   
      18                 :     $_SERVER['PHP_SELF'] = '/test.php';                                                                                                 
      19                 :                                                                                                                                         
      20                 :     $_SERVER['HTTP_HOST'] = $_SERVER['SERVER_NAME'];                                                                                    
      21                 :     $_SERVER["REQUEST_URI"] = $_SERVER['PHP_SELF'];                                                                                     
      22                 :                                                                                                                                         
      23                 :     require_once 'PHPDS.inc.php';                                                                                                       
      24                 :     require_once 'PHPDS_exception.class.php'; // need for the various exception objects                                                 
      25                 :                                                                                                                                         
      26                 :                                                                                                                                         
      27                 :     class PHPDSlib extends PHPDS                                                                                                        
      28                 :     {                                                                                                                                   
      29                 :         protected static $_instance;                                                                                                    
      30                 :                                                                                                                                         
      31                 :         public function __construct()                                                                                                   
      32                 :         {                                                                                                                               
      33               1 :             parent::__construct(true);                                                                                                  
      34               1 :         }                                                                                                                               
      35                 :                                                                                                                                         
      36                 :         public static function instance()                                                                                               
      37                 :         {                                                                                                                               
      38              67 :             if (empty(PHPDSlib::$_instance)) {                                                                                          
      39               1 :                 PHPDSlib::$_instance = new PHPDSlib(true);                                                                              
      40               1 :             }                                                                                                                           
      41              67 :             return PHPDSlib::$_instance;                                                                                                
      42                 :         }                                                                                                                               
      43                 :                                                                                                                                         
      44                 :         protected function config()                                                                                                     
      45                 :         {                                                                                                                               
      46               1 :             $success = spl_autoload_register(array($this, "PHPDS_autoloader"));                                                         
      47                 :                                                                                                                                         
      48                 :             /*$configuration = array();                                                                                                 
      49                 :                                                                                                                                         
      50                 :             $configuration['debug']['enable'] = true;                                                                                   
      51                 :             $configuration['debug']['level'] = 4; //     DEBUG = 4;INFO = 3;WARN = 2;ERROR = 1;LOG = 0;                                 
      52                 :             $configuration['debug']['firePHP'] = true;                                                                                  
      53                 :             $configuration['debug']['serverlog'] = true;                                                                                
      54                 :             //$configuration['debug']['serverlog'] = false;                                                                             
      55                 :             //$configuration['debug']['domains'] = array('authlib', 'test', 'user', 'db', 'security', 'skel', 'core', '!');             
      56                 :             $configuration['debug']['domains'] = array('authlib', 'test', 'user', 'security');                                          
      57                 :                                                                                                                                         
      58                 :             $configuration['error']['display'] = true;                                                                                  
      59                 :             $configuration['error']['firePHP'] = true;                                                                                  
      60                 :             $configuration['error']['ignore_notices'] = false;                                                                          
      61                 :             $configuration['error']['ignore_warnings'] = false;                                                                         
      62                 :             //$configuration['error']['file'] = '/tmp/phpdevshell.'.date('Y-m-d').'.log';                                               
      63                 :             //$configuration['error']['mail']= 'root@vecteurm.com';                                                                     
      64                 :                                                                                                                                         
      65                 :             $configuration['production'] = false;                                                                                       
      66                 :                                                                                                                                         
      67                 :             $configuration['gzip'] = false;                                                                                             
      68                 :                                                                                                                                         
      69                 :             error_reporting(E_ALL);                                                                                                     
      70                 :                                                                                                                                         
      71                 :             $this->configuration = $configuration;*/                                                                                    
      72               1 :         }                                                                                                                               
      73                 :     }                                                                                                                                   

Generated by PHP_CodeCoverage 1.0.4 using PHP 5.3.6 and PHPUnit 3.5.14 at Mon Aug 8 22:35:38 PDT 2011.