Changeset 1104

Show
Ignore:
Timestamp:
09/07/08 14:11:01 (3 months ago)
Author:
arnoschn
Message:

adding test-url to ci-config.yaml

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/arnoschn/cache/lib/utils/scripts/ci-test.php

    r1102 r1104  
    185185            $this->_createCiPhpConfigFile(); 
    186186        } 
    187          
     187        $returnVal = $this->_checkWebserver2($this->settings['test-url']) && $returnVal; 
    188188        return $returnVal; 
    189189        // if all passes return true 
     
    204204        return true; 
    205205    } 
     206    function _checkWebserver2($url) 
     207    { 
     208        $return = true; 
     209        $testIndexPage = @file_get_contents($url.'/'); 
     210        if ($testIndexPage!='Test::page::index') { 
     211            $this->error('Webserver Configuration problems:'."\n" .$testIndexPage."\n\n"); 
     212            $return = false; 
     213        } else { 
     214            $this->info('Web Server is configured correctly'); 
     215        } 
     216        return $return; 
     217    } 
     218     
    206219    function _checkWebServer($url) 
    207220    { 
     
    245258        $this->info('Web Server is reachable at '.$url); 
    246259         
    247         $testIndexPage = @file_get_contents($url.'/'); 
    248         if ($testIndexPage!='Test::page::index') { 
    249             $this->error('Webserver Configuration problems:'."\n" .$testIndexPage."\n\n"); 
    250             $return = false; 
    251         } else { 
    252             $this->info('Web Server is configured correctly'); 
    253         } 
     260         
    254261 
    255262        return $return; 
     
    324331        $file = AK_BASE_DIR.DS.'config'.DS.'ci-config.php'; 
    325332        $settings = array(); 
    326         $settings['${testing-url}'] = $this->_promptForTestingUrl(); 
    327  
     333        $settings['${testing-url}'] = $this->settings['test-url']; 
    328334        return file_put_contents($file,str_replace(array_keys($settings),array_values($settings),file_get_contents($templateFile)))>0; 
    329335    } 
     
    337343        $settings['${php4}'] = $this->_promptForPhp('php4'); 
    338344        $settings['${php5}'] = $this->_promptForPhp('php5'); 
     345        $settings['${test-url}'] = $this->_promptForTestingUrl(); 
    339346        return file_put_contents($file,str_replace(array_keys($settings),array_values($settings),file_get_contents($templateFile)))>0; 
    340347    }