You are here

public function AgeTracker::ageIncreasedBetweenLastTwoRequests in Pantheon Advanced Page Cache 8

File

tests/behat/helper_classes/AgeTracker.php, line 60

Class

AgeTracker

Namespace

PantheonSystems\CDNBehatHelpers

Code

public function ageIncreasedBetweenLastTwoRequests($path) {

  // Assign the headers to a new variable so that $this->headers is not modified by array_pop().
  $headers = $this->headers[$path];
  $most_recent = array_pop($headers);
  $second_most_recent = array_pop($headers);
  $return = (int) $most_recent['age'] > (int) $second_most_recent['age'];
  return $return;
}