get_post_date() public method

Deprecation: 3.2 Retrieve a post date when post is published, or return current date when it's not.
public get_post_date ( WP_Post $post ) : string
$post WP_Post The post for which to retrieve the post date.
return string
 /**
  * @covers WPSEO_Metabox::get_post_date()
  */
 public function test_get_post_date()
 {
     // create and go to post
     $post_id = $this->factory->post->create();
     $this->go_to(get_permalink($post_id));
     $post = get_post($post_id);
     $expected_date = date('j M Y', strtotime($post->post_date));
     $this->assertEquals($expected_date, self::$class_instance->get_post_date($post));
 }