Skip to content

Commit

Permalink
More round bracket related tests
Browse files Browse the repository at this point in the history
  • Loading branch information
krzyc committed May 27, 2024
1 parent a604278 commit edaa7f4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Binary file modified samples/bugs/Issue715.pdf
Binary file not shown.
3 changes: 3 additions & 0 deletions tests/PHPUnit/Integration/Element/ElementStringTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion tests/PHPUnit/Integration/ParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit edaa7f4

Please sign in to comment.