Example #1
0
 public function testAllowFromStringCreatesValidAllowHeader()
 {
     $allowHeader = Allow::fromString('Allow: GET, POST');
     $this->assertInstanceOf('Zend\\Http\\Header\\HeaderDescription', $allowHeader);
     $this->assertInstanceOf('Zend\\Http\\Header\\Allow', $allowHeader);
     $this->assertEquals(array('GET', 'POST'), $allowHeader->getAllowedMethods());
 }
Example #2
0
 public function testAllowFromStringSupportsExtensionMethods()
 {
     $allowHeader = Allow::fromString('Allow: GET, POST, PROCREATE');
     $this->assertTrue($allowHeader->isAllowedMethod('PROCREATE'));
 }
Example #3
0
 public function testAllowFromStringWithNonPostMethod()
 {
     $allowHeader = Allow::fromString('Allow: GET');
     $this->assertEquals('GET', $allowHeader->getFieldValue());
 }