public function testCanSetAndGetEtag() { $data = Etag::fromString("Etag: W/&FooBarBaz&"); $this->entry->setEtag($data); $this->assertEquals($this->entry->getEtag(), $data); }
public function testGenerateIfMatchHeaderDataReturnsEtagIfNotWeakAndFlagSet() { $etag = Etag::fromString('Etag: ABCD1234'); $this->service->setMajorProtocolVersion(2); $entry = new App\Entry(); $entry->setEtag($etag); $result = $this->service->generateIfMatchHeaderData($entry, true); $this->assertEquals($etag->getFieldValue(), $result); }