Changeset 4773

Show
Ignore:
Timestamp:
08/15/08 17:52:09 (11 months ago)
Author:
guilhermeblanco
Message:

Added needed changes to support backtrace generation of 5.3 win build.

Location:
branches/1.0/tests
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • branches/1.0/tests/DoctrineTest.php

    r4149 r4773  
    171171    { 
    172172        $models = new DirectoryIterator(dirname(__FILE__) . '/models/'); 
     173 
    173174        foreach($models as $key => $file) { 
    174175            if ($file->isFile() && ! $file->isDot()) { 
    175176                $e = explode('.', $file->getFileName()); 
     177 
    176178                if (end($e) === 'php') { 
    177179                    require_once $file->getPathname(); 
     
    190192        $currentName=''; 
    191193        $options=array(); 
     194 
    192195        foreach($array as $name) { 
    193196            if (strpos($name,'-')===0) { 
    194                 $name=str_replace('-','',$name);       
     197                $name=str_replace('-','',$name); 
    195198                $currentName=$name; 
     199 
    196200                if ( ! isset($options[$currentName])) { 
    197201                    $options[$currentName]=array();          
     
    203207            } 
    204208        } 
     209 
    205210        return $options; 
    206211    } 
     
    219224        } 
    220225 
    221         $e      = explode('_', $class); 
    222         $count  = count($e); 
    223  
     226        $e = explode('_', $class); 
     227        $count = count($e); 
    224228        $prefix = array_shift($e); 
    225229 
     
    228232        } 
    229233 
    230         $dir    = array_shift($e); 
    231  
    232         $file   = $dir . '_' . substr(implode('_', $e), 0, -(strlen('_TestCase'))) . 'TestCase.php'; 
    233  
    234         if ( $count > 3) { 
    235             $file   = str_replace('_', DIRECTORY_SEPARATOR, $file); 
    236         } else { 
    237             $file   = str_replace('_', '', $file); 
    238         } 
     234        $dir = array_shift($e); 
     235        $file = $dir . '_' . substr(implode('_', $e), 0, -(strlen('_TestCase'))) . 'TestCase.php'; 
     236        $file = str_replace('_', (($count > 3) ? DIRECTORY_SEPARATOR : ''), $file); 
    239237 
    240238        // create a test case file if it doesn't exist 
    241  
    242239        if ( ! file_exists($file)) { 
    243240            $contents = file_get_contents('template.tpl'); 
     
    250247            file_put_contents($file, $contents); 
    251248        } 
     249 
    252250        require_once($file); 
    253251 
  • branches/1.0/tests/run.php

    r4772 r4773  
    11<?php 
     2 
     3// Debug Diagnosic process attacher sleep time needed to link process 
     4// More info about that: http://bugs.php.net/bugs-generating-backtrace-win32.php 
     5//sleep(10); 
     6 
    27error_reporting(E_ALL | E_STRICT); 
    38ini_set('max_execution_time', 900); 
    49ini_set('date.timezone', 'GMT+0'); 
    510 
     11$DCTRN_DIR = (defined('DOCTRINE_DIR') ? DOCTRINE_DIR : dirname(__FILE__) . '/../lib/'); 
     12 
    613require_once(dirname(__FILE__) . '/DoctrineTest.php'); 
    7 require_once((defined('DOCTRINE_DIR') ? DOCTRINE_DIR : dirname(__FILE__) . '/../lib/') .'Doctrine.php'); 
     14require_once($DCTRN_DIR .'Doctrine.php'); 
    815spl_autoload_register(array('Doctrine', 'autoload')); 
    916spl_autoload_register(array('DoctrineTest','autoload')); 
     17 
     18/*require_once $DCTRN_DIR . 'Doctrine/Exception.php'; 
     19 
     20require_once $DCTRN_DIR . 'Doctrine/Locator/Injectable.php'; 
     21require_once $DCTRN_DIR . 'Doctrine/Access.php'; 
     22require_once $DCTRN_DIR . 'Doctrine/Record/Abstract.php'; 
     23require_once $DCTRN_DIR . 'Doctrine/Record.php'; 
     24 
     25require_once $DCTRN_DIR . 'Doctrine/Configurable.php'; 
     26require_once $DCTRN_DIR . 'Doctrine/Table.php'; 
     27 
     28require_once $DCTRN_DIR . 'Doctrine/EventListener/Interface.php'; 
     29require_once $DCTRN_DIR . 'Doctrine/EventListener.php'; 
     30 
     31require_once $DCTRN_DIR . 'Doctrine/Template.php'; 
     32 
     33require_once $DCTRN_DIR . 'Doctrine/Manager/Exception.php'; 
     34require_once $DCTRN_DIR . 'Doctrine/Manager.php'; 
     35require_once $DCTRN_DIR . 'Doctrine/Null.php'; 
     36*/ 
     37// Test case 
     38//require_once dirname(__FILE__) . '/Ticket/NjeroTestCase.php'; 
     39 
    1040 
    1141$test = new DoctrineTest(); 
  • branches/1.0/tests/Ticket/NjeroTestCase.php

    r3884 r4773  
    1515{ 
    1616    public function prepareData() { } 
     17     
    1718    public function prepareTables() 
    1819    { 
     
    2223        $this->tables[] = 'PolicyN'; 
    2324        $this->tables[] = 'RateN'; 
    24         parent::prepareTables();     
     25 
     26        parent::prepareTables(); 
    2527    } 
    2628