$this->
assertSame('foo', HeaderUtils::
quote('foo'
));
$this->
assertSame('az09!#$%&\'*.^_`|~-', HeaderUtils::
quote('az09!#$%&\'*.^_`|~-'
));
$this->
assertSame('"foo bar"', HeaderUtils::
quote('foo bar'
));
$this->
assertSame('"foo [bar]"', HeaderUtils::
quote('foo [bar]'
));
$this->
assertSame('"foo \"bar\""', HeaderUtils::
quote('foo "bar"'
));
$this->
assertSame('"foo \\\\ bar"', HeaderUtils::
quote('foo \\ bar'
));
} public function testUnquote() { $this->
assertEquals('foo', HeaderUtils::
unquote('foo'
));
$this->
assertEquals('az09!#$%&\'*.^_`|~-', HeaderUtils::
unquote('az09!#$%&\'*.^_`|~-'
));
$this->
assertEquals('foo bar', HeaderUtils::
unquote('"foo bar"'
));
$this->
assertEquals('foo [bar]', HeaderUtils::
unquote('"foo [bar]"'
));
$this->
assertEquals('foo "bar"', HeaderUtils::
unquote('"foo \"bar\""'
));
$this->
assertEquals('foo "bar"', HeaderUtils::
unquote('"foo \"\b\a\r\""'
));
$this->
assertEquals('foo \\ bar', HeaderUtils::
unquote('"foo \\\\ bar"'
));
} public function testMakeDispositionInvalidDisposition() { $this->
expectException(\InvalidArgumentException::
class);