public function testEscapeString() { $enc = new \Com\Tecnick\Pdf\Encrypt\Encrypt(); $result = $enc->escapeString(''); $this->assertEquals('', $result); $result = $enc->escapeString('hello world'); $this->assertEquals('hello world', $result); $result = $enc->escapeString('(hello world) slash \\' . chr(13)); $this->assertEquals('\\(hello world\\) slash \\\\\\r', $result); }