示例#1
0
 public function testAllowsArrayInConstructor()
 {
     $h = new Header('Foo', array('Testing', '123', 'Foo=baz'));
     $this->assertEquals(array('Testing', '123', 'Foo=baz'), $h->toArray());
 }
示例#2
0
 public function testCanRemoveValues()
 {
     $h = new Header('Foo', array('Foo', 'baz', 'bar'));
     $h->removeValue('bar');
     $this->assertTrue($h->hasValue('Foo'));
     $this->assertFalse($h->hasValue('bar'));
     $this->assertTrue($h->hasValue('baz'));
 }
示例#3
0
 public function removeValue($searchValue)
 {
     parent::removeValue($searchValue);
     $this->directives = null;
 }
 public function testCanCheckForExactHeaderValues()
 {
     $h = new Header('Foo', 'bar', ';');
     $this->assertTrue($h->hasExactHeader('Foo'));
     $this->assertFalse($h->hasExactHeader('foo'));
 }