function testGetImage() { $post_id = $this->factory->post->create(array('post_title' => 'St. Louis History')); $filename = TestTimberImage::copyTestImage('arch.jpg'); $attachment = array('post_title' => 'The Arch', 'post_content' => ''); $iid = wp_insert_attachment($attachment, $filename, $post_id); update_post_meta($post_id, 'landmark', $iid); $post = new TimberPost($post_id); $image = $post->get_image('landmark'); $this->assertEquals('The Arch', $image->title()); }