/** * @dataProvider get_first_content_image_provider */ public function test_get_first_content_image($expected_value, $post_content) { $post_id = $this->factory->post->create(array('post_content' => $post_content)); $post = new BasePost($post_id); $this->assertEquals($expected_value, $post->get_first_content_image()); }