Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 11 additions & 16 deletions Tests/AbstractWebApplicationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ public function testRedirectLegacyBehavior()
$object->expects($this->exactly(2))
->method('checkHeadersSent')
->willReturn(false);
$object->expects($this->exactly(7))
$object->expects($this->exactly(6))
->method('header')
->willReturnCallback([$this, 'mockHeader']);

Expand All @@ -582,8 +582,7 @@ public function testRedirectLegacyBehavior()
['Content-Type: text/html; charset=utf-8', true, null],
['Expires: Wed, 17 Aug 2005 00:00:00 GMT', true, null],
['Last-Modified: ' . $date->format('D, d M Y H:i:s e'), true, null],
['Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0', true, null],
['Pragma: no-cache', true, null],
['Cache-Control: no-cache, must-revalidate', true, null],
]
);
}
Expand All @@ -610,7 +609,7 @@ public function testRedirect()
$object->expects($this->exactly(2))
->method('checkHeadersSent')
->willReturn(false);
$object->expects($this->exactly(7))
$object->expects($this->exactly(6))
->method('header')
->willReturnCallback([$this, 'mockHeader']);

Expand All @@ -628,8 +627,7 @@ public function testRedirect()
['Content-Type: text/html; charset=utf-8', true, null],
['Expires: Wed, 17 Aug 2005 00:00:00 GMT', true, null],
['Last-Modified: ' . $date->format('D, d M Y H:i:s e'), true, null],
['Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0', true, null],
['Pragma: no-cache', true, null],
['Cache-Control: no-cache, must-revalidate', true, null],
]
);
}
Expand All @@ -656,7 +654,7 @@ public function testRedirectWithExistingStatusCode()
$object->expects($this->exactly(2))
->method('checkHeadersSent')
->willReturn(false);
$object->expects($this->exactly(7))
$object->expects($this->exactly(6))
->method('header')
->willReturnCallback([$this, 'mockHeader']);

Expand All @@ -676,8 +674,7 @@ public function testRedirectWithExistingStatusCode()
['Content-Type: text/html; charset=utf-8', true, null],
['Expires: Wed, 17 Aug 2005 00:00:00 GMT', true, null],
['Last-Modified: ' . $date->format('D, d M Y H:i:s e'), true, null],
['Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0', true, null],
['Pragma: no-cache', true, null],
['Cache-Control: no-cache, must-revalidate', true, null],
]
);
}
Expand All @@ -704,7 +701,7 @@ public function testRedirectWithAdditionalHeaders()
$object->expects($this->exactly(2))
->method('checkHeadersSent')
->willReturn(false);
$object->expects($this->exactly(7))
$object->expects($this->exactly(6))
->method('header')
->willReturnCallback([$this, 'mockHeader']);

Expand All @@ -723,8 +720,7 @@ public function testRedirectWithAdditionalHeaders()
['Content-Type: text/html; charset=utf-8', true, null],
['Expires: Wed, 17 Aug 2005 00:00:00 GMT', true, null],
['Last-Modified: ' . $date->format('D, d M Y H:i:s e'), true, null],
['Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0', true, null],
['Pragma: no-cache', true, null],
['Cache-Control: no-cache, must-revalidate', true, null],
]
);
}
Expand Down Expand Up @@ -828,7 +824,7 @@ public function testRedirectWithMoved()
$object->expects($this->exactly(2))
->method('checkHeadersSent')
->willReturn(false);
$object->expects($this->exactly(7))
$object->expects($this->exactly(6))
->method('header')
->willReturnCallback([$this, 'mockHeader']);

Expand All @@ -847,8 +843,7 @@ public function testRedirectWithMoved()
['Content-Type: text/html; charset=utf-8', true, null],
['Expires: Wed, 17 Aug 2005 00:00:00 GMT', true, null],
['Last-Modified: ' . $date->format('D, d M Y H:i:s e'), true, null],
['Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0', true, null],
['Pragma: no-cache', true, null],
['Cache-Control: no-cache, must-revalidate', true, null],
]
);
}
Expand Down Expand Up @@ -880,7 +875,7 @@ public function testRedirectWithUrl(string $url, string $expected)
$object->expects($this->exactly(2))
->method('checkHeadersSent')
->willReturn(false);
$object->expects($this->exactly(7))
$object->expects($this->exactly(6))
->method('header')
->willReturnCallback([$this, 'mockHeader']);

Expand Down
Loading