|
|
@@ -371,4 +371,29 @@ class Zend_Pdf_ActionTest extends PHPUnit_Framework_TestCase
|
|
|
$this->assertTrue($pdf->resolveDestination($action1->getDestination()) === $page2);
|
|
|
$this->assertTrue($pdf->resolveDestination($action2->getDestination()) === null);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @group ZF-8462
|
|
|
+ */
|
|
|
+ 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';
|
|
|
+ $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.');
|
|
|
+ }
|
|
|
+ // nothing happen no bug?
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ $this->fail('An expected Exception has never been raised.');
|
|
|
+ }
|
|
|
}
|