You are here

protected function ShareMessageViewModesTest::assertOGTags in Share Message 7

Checks for the markup of the OG meta tags.

Parameters

$title: The title of the ShareMessage as should get printed to og:title.

bool $invert: Set to true to invert the assertion, for example to make sure the OG tags are not rendered.

1 call to ShareMessageViewModesTest::assertOGTags()
ShareMessageViewModesTest::testShareMessageViewModes in tests/sharemessage.test
Checks whether view modes render expected markup.

File

tests/sharemessage.test, line 324
ShareMessage tests.

Class

ShareMessageViewModesTest

Code

protected function assertOGTags($title, $invert = FALSE) {
  $meta_title = '<meta property="og:title" content="' . $title . '" />';
  if ($invert) {
    $this
      ->assertNoRaw($meta_title);
  }
  else {
    $this
      ->assertRaw($meta_title);
  }
}