You are here

public function FeatureContext::assertPathAgeIncreased in Pantheon Advanced Page Cache 8

@Then :path has not been purged

File

tests/behat/helper_classes/Contexts/FeatureContext.php, line 105

Class

FeatureContext
Define application features from the specific context.

Namespace

PantheonSystems\CDNBehatHelpers\Contexts

Code

public function assertPathAgeIncreased($path) {
  $age = $this
    ->getAge($path);
  $ageTracker = $this
    ->getAgeTracker();
  if (!$ageTracker
    ->ageIncreasedBetweenLastTwoRequests($path)) {
    throw new \Exception('Cache age did not increase');
  }
}