Changeset 17

Show
Ignore:
Timestamp:
11/28/06 05:23:24 (2 years ago)
Author:
bermiferrer
Message:

Enabled running tests using a relative route generated by the shell auto-completion. Before this change you had to specify the route like ./script/test unit/app/models/todo_list.php which. Now you can use ./script/test test/unit/app/models/todo_list.php

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/AkActiveRecord.php

    r15 r17  
    19201920    } 
    19211921 
    1922     /* 
    1923     foreach ($this->_combinedAttributes as $attribute=>$rule){ 
    1924     $pattern = array_shift($rule); 
    1925     if(method_exists(&$this, $pattern.'Decompose')){ 
    1926     $pieces = $this->{$pattern.'Decompose'}($this->$attribute); 
    1927     if(is_array($pieces)){ 
    1928     foreach ($pieces as $k=>$v){ 
    1929     $this->setAttribute($k, $v); 
    1930     } 
    1931     } 
    1932     }else{ 
    1933     $ary = sscanf($this->$attribute, $pattern); 
    1934     for ($x=0;$x<count($ary);$x++){ 
    1935     $subattribute = $rule[$x]; 
    1936     if(!isset($subattribute_override_protection[$subattribute])){ 
    1937     $subattribute_override_protection[$subattribute] = $ary[$x]; 
    1938     $this->setAttribute($subattribute, $ary[$x], true, !$this->isCombinedAttribute($subattribute)); 
    1939     } 
    1940     } 
    1941     } 
    1942     } 
    1943     */ 
    19441922 
    19451923 
  • trunk/lib/AkDevelopmentErrorHandler.php

    r2 r17  
    3232 
    3333 
     34    /** 
     35     * @package AkelosFramework 
     36     * @subpackage Reporting 
     37     */ 
    3438    class AkDevelopmentErrorHandler { 
    3539 
  • trunk/script/test

    r2 r17  
    2626$tests_dir = realpath(dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'test'); 
    2727foreach ($argv as $test){ 
    28     $test = strstr($test,'.php') ? $test : $test.'.php'; 
     28    $test = strstr($test,'.php') ? trim($test, '/') : $test.'.php'; 
     29    $test = substr($test,0,5) == 'test/' ? substr($test,5) : $test; 
    2930    $test = $tests_dir.DIRECTORY_SEPARATOR.$test; 
    3031    if(!file_exists($test)){