+ $_SERVER['HTTP_IF_NONE_MATCH'] = '"abc"';
+ $this->assertTrue(HttpUtil::matchEtag('abc'));
+ $this->assertFalse(HttpUtil::matchEtag('ABC'));
+ unset($_SERVER['HTTP_IF_NONE_MATCH']);
+
+ $_SERVER['HTTP_IF_MATCH'] = '"abc"';
+ $this->assertTrue(HttpUtil::matchEtag('abc', true));
+ $this->assertFalse(HttpUtil::matchEtag('ABC', true));
+ unset($_SERVER['HTTP_IF_MATCH']);
+
+ $_SERVER['HTTP_IF_NONE_MATCH'] = '*';
+ $this->assertTrue(HttpUtil::matchEtag('abc'));
+ $this->assertTrue(HttpUtil::matchEtag('ABC'));
+ unset($_SERVER['HTTP_IF_NONE_MATCH']);
+
+ $_SERVER['HTTP_IF_MATCH'] = '*';
+ $this->assertTrue(HttpUtil::matchEtag('abc', true));
+ $this->assertTrue(HttpUtil::matchEtag('ABC', true));
+ unset($_SERVER['HTTP_IF_MATCH']);