You are here

private function AcquiaLiftsWebTest::assertLiftMetaTag in Acquia Lift Connector 7.3

Helper function to assert that a meta tag is found in the page

5 calls to AcquiaLiftsWebTest::assertLiftMetaTag()
AcquiaLiftsWebTest::testFieldMappings in tests/acquia_lift.test
AcquiaLiftsWebTest::testLiftCredentials in tests/acquia_lift.test
Test credentials are output for Lift.
AcquiaLiftsWebTest::testNodePage in tests/acquia_lift.test
AcquiaLiftsWebTest::testNonNodePage in tests/acquia_lift.test
AcquiaLiftsWebTest::testUDFMappings in tests/acquia_lift.test

File

tests/acquia_lift.test, line 533
Tests for Acquia Lift Profiles module.

Class

AcquiaLiftsWebTest
Tests Acquia Lift functionality.

Code

private function assertLiftMetaTag($name, $value = NULL) {
  $pattern = '/<meta (?=[^>]*itemprop="acquia_lift:' . preg_quote($name, '/') . '")';
  if (!empty($value)) {
    $pattern .= '(?=[^>]*content="' . preg_quote($value, '/') . '")';
  }
  $pattern .= '/';
  $this
    ->assertPattern($pattern, 'Found meta tag for ' . $name);
}