/** * @group FileService */ public function testSends304WithIfNoneMatchHeadersIncludedAndDeflationEnabled() { $file = new \Elgg\FileService\File(); $file->setFile($this->file); $request = $this->createRequest($file); $request->headers->set('if_none_match', '"' . $this->file->getModifiedTime() . '-gzip"'); $response = $this->handler->getResponse($request); $this->assertEquals(304, $response->getStatusCode()); }
/** * @group FileService */ public function testCanSetModifiedTime() { $time = $this->file->getModifiedTime(); $this->file->setModifiedTime(); $this->assertNotEquals($time, $this->file->getModifiedTime()); }