Explorar el Código

Zend_Pdf: Minor update for ZF-8462 fix unit tests.

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@20420 44c647ce-9c0f-0410-b52a-842ac1e357ba
alexander hace 16 años
padre
commit
a4375aa881
Se han modificado 1 ficheros con 5 adiciones y 13 borrados
  1. 5 13
      tests/Zend/Pdf/ActionTest.php

+ 5 - 13
tests/Zend/Pdf/ActionTest.php

@@ -444,23 +444,15 @@ class Zend_Pdf_ActionTest extends PHPUnit_Framework_TestCase
      */
     public function testPhpVersionBug()
     {
-        if (!version_compare(phpversion(), '5.3.0', '>=')) {
-            $this->markTestSkipped('PHP Version must be 5.3.0 or higher');
-        }
-
         try {
-            $file = '_files/ZF-8462.pdf';
+            $file = dirname(__FILE__) . '/_files/ZF-8462.pdf';
             $pdf = Zend_Pdf::load($file);
         } catch (Zend_Pdf_Exception $e) {
-            // skip this Exception because that should happen
-            $error = error_get_last();
-            if ($error !== null && $error['type'] == E_WARNING) {
-                $this->fail('The expected bug exists. Please verify.');
+            if (strpos($e->getMessage(), 'Cross-reference streams are not supported yet.') !== false) {
+                // Skip expected exception
+                return;
             }
-            // nothing happen no bug?
-            return;
+            throw $e;
         }
-
-        $this->fail('An expected Exception has never been raised.');
     }
 }