Author: maksim_ka
Date: 2010-02-03 10:22:00 +0100 (Wed, 03 Feb 2010)
New Revision: 27478

Modified:
   
plugins/sfPhpunitPlugin/branches/1.4/lib/test/sfBasePhpunitTestSuite.class.php
   plugins/sfPhpunitPlugin/branches/1.4/lib/test/sfPhpunitSuiteLoader.class.php
Log:
[sfPhpunitPlugin][sf1.4] fix next errors: 
- multiple contexts didnot supported different environment
- suites did not cathced by the loader automatically

Modified: 
plugins/sfPhpunitPlugin/branches/1.4/lib/test/sfBasePhpunitTestSuite.class.php
===================================================================
--- 
plugins/sfPhpunitPlugin/branches/1.4/lib/test/sfBasePhpunitTestSuite.class.php  
    2010-02-03 09:21:11 UTC (rev 27477)
+++ 
plugins/sfPhpunitPlugin/branches/1.4/lib/test/sfBasePhpunitTestSuite.class.php  
    2010-02-03 09:22:00 UTC (rev 27478)
@@ -83,13 +83,14 @@
     
     $app = $this->getApplication();
     $env = $this->getEnvironment();
+    $name = $app.'-'.$env; 
     
-       if (!sfContext::hasInstance($app)) {
+       if (!sfContext::hasInstance($name)) {
          sfContext::createInstance(
-           ProjectConfiguration::getApplicationConfiguration($app, $env, 
true), $app);
+           ProjectConfiguration::getApplicationConfiguration($app, $env, 
true), $name);
        }
        
-       sfContext::switchTo($app);
+       sfContext::switchTo($name);
   }
   
   /**

Modified: 
plugins/sfPhpunitPlugin/branches/1.4/lib/test/sfPhpunitSuiteLoader.class.php
===================================================================
--- 
plugins/sfPhpunitPlugin/branches/1.4/lib/test/sfPhpunitSuiteLoader.class.php    
    2010-02-03 09:21:11 UTC (rev 27477)
+++ 
plugins/sfPhpunitPlugin/branches/1.4/lib/test/sfPhpunitSuiteLoader.class.php    
    2010-02-03 09:22:00 UTC (rev 27478)
@@ -73,6 +73,7 @@
            }
 
                        foreach ($dirs as $dir) {
+                         $test_dir .= '/'.$dir;
                                $suite->addTestSuite($suite_next = 
$this->_getTestSuiteForDir($test_dir));
                                $suite = $suite_next;
                        }
@@ -85,11 +86,9 @@
         * 
         * @return PHPUnit_Framework_TestResult
         */
-       public function run()
+       public function run($result = null)
        {
-               $this->getSuite()->run($result = new 
PHPUnit_Framework_TestResult());
-               
-               return $result;
+               return $this->getSuite()->run($result);
        }
 
        /**

-- 
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