function testGetPostByMeta() { $post_id = $this->factory->post->create(array('post_title' => 'Hugh Abbot')); $position = 'Secretary of State for Social Affairs'; update_post_meta($post_id, 'position', $position); $pid = TimberHelper::get_post_by_meta('position', $position); $this->assertEquals($post_id, $pid); }