function testMultilineSearchWithPadding() { $expectation = new HttpHeaderExpectation('a', ' A '); $this->assertIdentical($expectation->test("aa:A\r\nb:B\r\nc:C"), false); $this->assertIdentical($expectation->test("aa:A\r\na:A\r\nb:B"), true); }
function testLocationHeaderSplitsCorrectly() { $expectation = new HttpHeaderExpectation('Location', 'http://here/'); $this->assertIdentical($expectation->test('Location: http://here/'), true); }
function testCaseInsensitivePatternMatching() { $expectation = new HttpHeaderExpectation('a', new PatternExpectation('/A/i')); $this->assertIdentical($expectation->test('a: a'), true); $this->assertIdentical($expectation->test('a: B'), false); $this->assertIdentical($expectation->test(' a : A '), true); $this->assertIdentical($expectation->test(' a : BAB '), true); $this->assertIdentical($expectation->test(' a : bab '), true); }