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()); }
public function testAllowFromStringSupportsExtensionMethods() { $allowHeader = Allow::fromString('Allow: GET, POST, PROCREATE'); $this->assertTrue($allowHeader->isAllowedMethod('PROCREATE')); }
public function testAllowFromStringWithNonPostMethod() { $allowHeader = Allow::fromString('Allow: GET'); $this->assertEquals('GET', $allowHeader->getFieldValue()); }