Ver Fonte

ZF-5606
- Fixed test to skip on case-insensitive file systems


git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@18351 44c647ce-9c0f-0410-b52a-842ac1e357ba

ralph há 16 anos atrás
pai
commit
7b450cf3ae

+ 9 - 2
tests/Zend/Db/Adapter/StaticTest.php

@@ -335,6 +335,14 @@ class Zend_Db_Adapter_StaticTest extends PHPUnit_Framework_TestCase
         $newIncludePath = realpath(dirname(__FILE__) . '/_files/') . PATH_SEPARATOR . get_include_path();
         $oldIncludePath = set_include_path($newIncludePath);
         
+        $loadedCaseInspecificFile = @include 'Test/MyCompany1/iscasespecific.php';
+        
+        if ($loadedCaseInspecificFile === true) {
+            set_include_path($oldIncludePath);
+            $this->markTestSkipped('This test is irrelevant on case-inspecific file systems.');
+            return;
+        }
+        
         try {
             $adapter = Zend_Db::factory(
                 'Dbadapter',
@@ -346,9 +354,8 @@ class Zend_Db_Adapter_StaticTest extends PHPUnit_Framework_TestCase
             return;
         }
         
-        $this->assertFalse(class_exists('Test_MyCompany2_Dbadapter'));
+        $this->assertFalse($adapter instanceof Test_Mycompany2_Dbadapter);
         set_include_path($oldIncludePath);
-        
     }
     
     public function getDriver()

+ 2 - 0
tests/Zend/Db/Adapter/_files/Test/MyCompany1/IsCaseSpecific.php

@@ -0,0 +1,2 @@
+<?php
+return true;