Show
Ignore:
Timestamp:
05/15/2007 08:54:57 PM (20 months ago)
Author:
wei
Message:

update phing simpletest task

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/framework/prado-cli.php

    r1938 r1953  
    1 #!/usr/bin/env php 
    21<?php 
    32 
     
    191190        { 
    192191                $app_dir = realpath($directory.'/protected/'); 
    193                 if($app_dir !== false) 
     192                if($app_dir !== false && is_dir($app_dir)) 
    194193                { 
    195194                        if(Prado::getApplication()===null) 
     
    483482        { 
    484483                $dir = realpath($args[1]); 
    485                 if($dir !== false) 
     484                if($dir !== false && is_dir($dir)) 
    486485                        $this->runUnitTests($dir,$args); 
    487486                else 
     
    525524        { 
    526525                $app_dir = realpath($dir.'/protected'); 
    527                 if($app_dir !== false) 
     526                if($app_dir !== false && is_dir($app_dir)) 
    528527                        return $app_dir; 
    529528                return realpath($dir.'/../protected'); 
     
    533532        { 
    534533                $test_dir = realpath($dir.'/unit'); 
    535                 if($test_dir !== false) 
     534                if($test_dir !== false && is_dir($test_dir)) 
    536535                        return $test_dir; 
    537536                return realpath($dir.'/tests/unit/'); 
     
    615614                if(is_dir($dir)) 
    616615                        return realpath($dir); 
    617                 if(false !== ($app_dir = realpath($dir.'/protected/'))) 
     616                if(false !== ($app_dir = realpath($dir.'/protected/')) && is_dir($app_dir)) 
    618617                        return $app_dir; 
    619618                echo '** Unable to find directory "'.$dir."\".\n"; 
     
    623622        protected function getXmlFile($app_dir) 
    624623        { 
    625                 if(false !== ($xml = realpath($app_dir.'/application.xml'))) 
     624                if(false !== ($xml = realpath($app_dir.'/application.xml')) && is_file($xml)) 
    626625                        return $xml; 
    627                 if(false !== ($xml = realpath($app_dir.'/protected/application.xml'))) 
     626                if(false !== ($xml = realpath($app_dir.'/protected/application.xml')) && is_file($xml)) 
    628627                        return $xml; 
    629628                echo '** Unable to find application.xml in '.$app_dir."\n"; 
     
    651650                                return $namespace; 
    652651                $file = Prado::getPathOfNamespace($namespace, ".php"); 
    653                 if($file !== null && false !== ($path = realpath(dirname($file)))) 
     652                if($file !== null && false !== ($path = realpath(dirname($file))) && is_dir($path)) 
    654653                { 
    655654                        if(strpos($path, $app_dir)===0)