public function testSetResponseCodeThrowsExceptionWithBadCode() { try { $this->_response->setHttpResponseCode(99); $this->fail('Should not accept response codes < 100'); } catch (Exception $e) { } try { $this->_response->setHttpResponseCode(600); $this->fail('Should not accept response codes > 599'); } catch (Exception $e) { } try { $this->_response->setHttpResponseCode('bogus'); $this->fail('Should not accept non-integer response codes'); } catch (Exception $e) { } }
public function testIsNotRedirectWithSufficientlyLarge3xxResponseCodeSet() { $this->_response->setHttpResponseCode(309); $this->assertFalse($this->_response->isRedirect()); }
public function testIsRedirectWhen3xxResponseCodeSet() { $this->_response->setHttpResponseCode(301); $this->assertTrue($this->_response->isRedirect()); }