Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / modules / contrib / metatag / metatag_open_graph / src / Tests / MetatagOpenGraphTagsTest.php
index 2520933f48ab3c5558116d58ae0870b799fb4462..2365155277c2676fcbe4e5e9ebcdc66d3038af3a 100644 (file)
@@ -2,7 +2,6 @@
 
 namespace Drupal\metatag_open_graph\Tests;
 
-use Drupal\simpletest\WebTestBase;
 use Drupal\metatag\Tests\MetatagTagsTestBase;
 
 /**
@@ -15,7 +14,7 @@ class MetatagOpenGraphTagsTest extends MetatagTagsTestBase {
   /**
    * {@inheritdoc}
    */
-  public $tags = [
+  private $tags = [
     'article_author',
     'article_expiration_time',
     'article_modified_time',
@@ -23,6 +22,10 @@ class MetatagOpenGraphTagsTest extends MetatagTagsTestBase {
     'article_publisher',
     'article_section',
     'article_tag',
+    'book_author',
+    'book_isbn',
+    'book_releasedate',
+    'book_tag',
     'og_country_name',
     'og_description',
     'og_determiner',
@@ -57,14 +60,14 @@ class MetatagOpenGraphTagsTest extends MetatagTagsTestBase {
   ];
 
   /**
-   * The tag to look for when testing the output.
+   * {@inheritdoc}
    */
-  public $test_tag = 'meta';
+  private $testTag = 'meta';
 
   /**
-   * The attribute to look for to indicate which tag.
+   * {@inheritdoc}
    */
-  public $test_name_attribute = 'property';
+  private $testNameAttribute = 'property';
 
   /**
    * {@inheritdoc}
@@ -77,10 +80,11 @@ class MetatagOpenGraphTagsTest extends MetatagTagsTestBase {
   /**
    * Each of these meta tags has a different tag name vs its internal name.
    */
-  public function getTestTagName($tag_name) {
+  private function getTestTagName($tag_name) {
     // Replace the first underline with a colon.
     $tag_name = str_replace('og_', 'og:', $tag_name);
     $tag_name = str_replace('article_', 'article:', $tag_name);
+    $tag_name = str_replace('book_', 'book:', $tag_name);
 
     // Some tags have an additional underline that turns into a colon.
     $tag_name = str_replace('og:image_', 'og:image:', $tag_name);