diff --git a/samples/bugs/Issue715.pdf b/samples/bugs/Issue715.pdf index 7dc919f8..b5b1fc7b 100644 Binary files a/samples/bugs/Issue715.pdf and b/samples/bugs/Issue715.pdf differ diff --git a/tests/PHPUnit/Integration/Element/ElementStringTest.php b/tests/PHPUnit/Integration/Element/ElementStringTest.php index 61d3ad6b..a6e21fb4 100644 --- a/tests/PHPUnit/Integration/Element/ElementStringTest.php +++ b/tests/PHPUnit/Integration/Element/ElementStringTest.php @@ -131,6 +131,9 @@ public function testParse(): void $element = ElementString::parse('(Gutter\\ console\\ assembly)', null, $offset); $this->assertEquals('Gutter console assembly', $element->getContent()); $this->assertEquals(27, $offset); + + $element = ElementString::parse('(())'); + $this->assertEquals('()', $element->getContent()); } public function testGetContent(): void diff --git a/tests/PHPUnit/Integration/ParserTest.php b/tests/PHPUnit/Integration/ParserTest.php index 2e1f3aa8..b91f0aae 100644 --- a/tests/PHPUnit/Integration/ParserTest.php +++ b/tests/PHPUnit/Integration/ParserTest.php @@ -449,8 +449,10 @@ public function testSpecialCharsEncodedAsHex(): void $this->fixture = new Parser(); $document = $this->fixture->parseFile($filename); $result = (string) ($document->getObjectsByType('Sig')['4_0'] ?? null)?->getHeader()->get('Contents'); - $this->assertEquals('()\\', $result); + $details = $document->getDetails(); + $this->assertEquals('x(y)', $details['Producer'] ?? null); + $this->assertEquals('a(b)', $details['Creator'] ?? null); } }