Skip to content
Snippets Groups Projects
Unverified Commit b5e6b905 authored by Roeland Jago Douma's avatar Roeland Jago Douma Committed by GitHub
Browse files

Merge pull request #21510 from nextcloud/fix/unit_test/responsetest

Fix unit test of the ResponseTest
parents 2e615c0e c006b5ff
No related branches found
No related tags found
No related merge requests found
......@@ -229,15 +229,15 @@ class ResponseTest extends \Test\TestCase {
public function testCacheSeconds() {
$time = $this->createMock(ITimeFactory::class);
$time->method('getTime')
->willReturn('1234567');
->willReturn(1234567);
$this->overwriteService(ITimeFactory::class, $time);
$this->childResponse->cacheFor(33);
$headers = $this->childResponse->getHeaders();
$this->assertEquals('max-age=33, must-revalidate', $headers['Cache-Control']);
$this->assertEquals('public', $headers['Pragma']);
$this->assertEquals('private, max-age=33, must-revalidate', $headers['Cache-Control']);
$this->assertEquals('private', $headers['Pragma']);
$this->assertEquals('Thu, 15 Jan 1970 06:56:40 +0000', $headers['Expires']);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment