/** * @dataProvider get_post_type_label_provider */ public function test_get_post_type_label($expected_value, array $post_type_def, $label) { register_post_type('test-post-type', $post_type_def); $post_id = $this->factory->post->create(array('post_type' => 'test-post-type')); $post_obj = new BasePost($post_id); $this->assertEquals($expected_value, $post_obj->get_post_type_label($label)); }