/** * @covers WPSEO_Frontend::attachment_redirect */ public function test_attachment_redirect() { // should not redirect on home page $this->go_to_home(); $this->assertFalse(self::$class_instance->attachment_redirect()); // create and go to post $post_id = $this->factory->post->create(); $this->go_to(get_permalink($post_id)); // should not redirect on regular post pages $this->assertFalse(self::$class_instance->attachment_redirect()); }