@ -85,33 +85,33 @@ class IslandoraDatastreamCacheTestCase extends IslandoraWebTestCase {
$this->drupalLogin($user);
// Test If-Modified-Since.
$result = $ this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
$this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
'If-Modified-Since: ' . $datastream->createdDate->format('D, d M Y H:i:s \G\M\T'),
));
$this->assertResponse(304);
$result = $ this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
$this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
'If-Modified-Since: ' . $datastream->createdDate->sub(new DateInterval('P1M'))->format('D, d M Y H:i:s \G\M\T'),
));
$this->assertResponse(200);
// Test If-Unmodified-Since.
$result = $ this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
$this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
'If-Unmodified-Since: ' . $datastream->createdDate->format('D, d M Y H:i:s \G\M\T'),
));
$this->assertResponse(200);
$result = $ this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
$this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
'If-Unmodified-Since: ' . $datastream->createdDate->sub(new DateInterval('P1M'))->format('D, d M Y H:i:s \G\M\T'),
));
$this->assertResponse(412);
// Test If-Match.
$result = $ this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
$this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
format_string('If-Match: "!checksum"', array(
'!checksum' => $datastream->checksum,
)),
));
$this->assertResponse(200);
$result = $ this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
$this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
format_string('If-Match: "!checksum"', array(
'!checksum' => 'dont-match' . $datastream->checksum,
)),
@ -119,13 +119,13 @@ class IslandoraDatastreamCacheTestCase extends IslandoraWebTestCase {
$this->assertResponse(412);
// Test If-None-Match.
$result = $ this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
$this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
format_string('If-None-Match: "!checksum"', array(
'!checksum' => $datastream->checksum,
)),
));
$this->assertResponse(304);
$result = $ this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
$this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
format_string('If-None-Match: "!checksum"', array(
'!checksum' => 'dont-match' . $datastream->checksum,
)),
@ -133,21 +133,21 @@ class IslandoraDatastreamCacheTestCase extends IslandoraWebTestCase {
$this->assertResponse(200);
// Test combination of If-None-Match and If-Modified-Since.
$result = $ this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
$this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
'If-Modified-Since: ' . $datastream->createdDate->format('D, d M Y H:i:s \G\M\T'),
format_string('If-None-Match: "!checksum"', array(
'!checksum' => $datastream->checksum,
)),
));
$this->assertResponse(304);
$result = $ this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
$this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
'If-Modified-Since: ' . $datastream->createdDate->format('D, d M Y H:i:s \G\M\T'),
format_string('If-None-Match: "!checksum"', array(
'!checksum' => 'dont-match' . $datastream->checksum,
)),
));
$this->assertResponse(200);
$result = $ this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
$this->drupalGet("islandora/object/{$object->id}/datastream/{$datastream->id}/view", array(), array(
'If-Modified-Since: ' . $datastream->createdDate->sub(new DateInterval('P1M'))->format('D, d M Y H:i:s \G\M\T'),
format_string('If-None-Match: "!checksum"', array(
'!checksum' => $datastream->checksum,