category() public méthode

Output the article category as an article:section tag.
public category ( ) : boolean;
Résultat boolean;
 /**
  * @covers WPSEO_OpenGraph::category
  */
 public function test_category()
 {
     // not singular, should return false
     $this->assertFalse(self::$class_instance->category());
     // Create post in category, go to post.
     $category_id = wp_create_category('Category Name');
     $post_id = $this->factory->post->create(array('post_category' => array($category_id)));
     $this->go_to(get_permalink($post_id));
     $this->assertTrue(self::$class_instance->category());
     $this->expectOutput('<meta property="article:section" content="Category Name" />' . "\n");
 }