/** * @group parse * @backupStaticAttributes enabled */ public function test_parse_データベースに保存() { $post_id = $this->factory->post->create(array('post_type' => MWF_Config::NAME)); $Setting = new MW_WP_Form_Setting($post_id); $Data = MW_WP_Form_Data::getInstance(MWF_Functions::get_form_key_from_form_id($post_id)); $Data->set('example', 'example'); $this->Mail->body = '{example}'; $this->Mail->parse($Setting, true); $posts = get_posts(array('post_type' => MWF_Functions::get_contact_data_post_type_from_form_id($post_id))); foreach ($posts as $post) { $this->assertEquals('example', get_post_meta($post->ID, 'example', true)); break; } }
/** * 自動返信メールに項目を設定 */ private function set_reply_mail_raw_params() { $this->Mail_auto_raw->set_reply_mail_raw_params($this->Setting); }