Author: maksim_ka
Date: 2010-02-05 22:14:53 +0100 (Fri, 05 Feb 2010)
New Revision: 27610

Modified:
   plugins/sfPhpunitPlugin/branches/1.4/lib/test/sfPhpunitSuiteLoader.class.php
Log:
[sfPhpunitPlugin][sf1.4] tests can be run from eclipse using 'run external' 
feature

Modified: 
plugins/sfPhpunitPlugin/branches/1.4/lib/test/sfPhpunitSuiteLoader.class.php
===================================================================
--- 
plugins/sfPhpunitPlugin/branches/1.4/lib/test/sfPhpunitSuiteLoader.class.php    
    2010-02-05 20:57:28 UTC (rev 27609)
+++ 
plugins/sfPhpunitPlugin/branches/1.4/lib/test/sfPhpunitSuiteLoader.class.php    
    2010-02-05 21:14:53 UTC (rev 27610)
@@ -40,7 +40,15 @@
                        $this->_recursively = true;
                } 
                
-               $root_dir = $test_dir = sfConfig::get('sf_test_dir').'/phpunit';
+               /*
+                * it is allowed us to run tests from eclipse using 'run 
external tool' feature
+                * for more info read: http://www.phpunit.de/wiki/Eclipse
+                */
+         $root_dir = $test_dir = sfConfig::get('sf_test_dir').'/phpunit';
+    if (false !== strpos($path, $root_dir)) {
+      $path = str_replace($root_dir, '', $path);
+    }
+               
                if (!file_exists($root_dir.'/'.$path)) {
                        throw new Exception('The path `'.$path.'` is invalid.');
                }

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.

Reply via email to