16 $visitor =
new Visitor();
18 'location' =>
'header',
19 'name' =>
'ContentType',
20 'sentAs' =>
'Content-Type'
22 $visitor->visit($this->command, $this->response, $param, $this->value);
23 $this->assertEquals(
'text/plain', $this->value[
'ContentType']);
28 $visitor =
new Visitor();
30 'location' =>
'header',
31 'name' =>
'Content-Type',
32 'filters' => array(
'strtoupper')
34 $visitor->visit($this->command, $this->response, $param, $this->value);
35 $this->assertEquals(
'TEXT/PLAIN', $this->value[
'Content-Type']);
40 $visitor =
new Visitor();
42 'location' =>
'header',
46 'additionalProperties' => array(
51 'X-Baz-Test' =>
'ABC',
52 'X-Baz-Bar' => array(
'123',
'456'),
55 $visitor->visit($this->command,
$response, $param, $this->value);
56 $this->assertEquals(array(
59 'Bar' => array(
'123',
'456')
70 $visitor =
new Visitor();
72 'location' =>
'header',
73 'name' =>
'Content-Type',
74 'additionalParameters' =>
false
76 $visitor->visit($this->command, $this->response, $param, $this->value);
77 $this->assertEquals(
'text/plain', $this->value[
'Content-Type']);
78 $this->assertArrayNotHasKey(
'X-Foo', $this->value);
87 $visitor =
new Visitor();
89 'location' =>
'header',
90 'name' =>
'ContentType',
91 'sentAs' =>
'Content-Type',
92 'additionalParameters' =>
false
94 $visitor->visit($this->command, $this->response, $param, $this->value);
95 $this->assertEquals(
'text/plain', $this->value[
'ContentType']);
96 $this->assertArrayNotHasKey(
'X-Foo', $this->value);