예제 #1
0
 public function add($value)
 {
     parent::add($value);
     $this->directives = null;
 }
예제 #2
0
 public function testUsesHeaderNameWhenNoneIsSupplied()
 {
     $h = new Header('Foo', 'bar', ';');
     $h->add('baz');
     $this->assertEquals(array('Foo'), array_keys($h->raw()));
 }
예제 #3
0
 public function testConvertToArrayUsingGlue()
 {
     $h = new Header('Foo', array('Testing, 123, Foo=baz'));
     $this->assertEquals(array('Testing', '123', 'Foo=baz'), $h->toArray());
     $h->add('hello');
     $this->assertEquals(array('Testing', '123', 'Foo=baz', 'hello'), $h->toArray());
     $h->removeValue('Testing');
     $this->assertEquals(array('123', 'Foo=baz', 'hello'), $h->toArray());
     $this->assertEquals('123, Foo=baz, hello', (string) $h);
 }