Ticket #7234: 7234.3.diff
File 7234.3.diff, 1.2 KB (added by , 7 years ago) |
---|
-
tests/phpunit/includes/factory.php
157 157 $this->default_generation_definitions = array( 158 158 'sender_id' => get_current_user_id(), 159 159 'thread_id' => 0, 160 'recipients' => array(),161 160 'subject' => new WP_UnitTest_Generator_Sequence( 'Message subject %s' ), 162 161 'content' => new WP_UnitTest_Generator_Sequence( 'Message content %s' ), 163 162 'date_sent' => bp_core_current_time(), … … 165 164 } 166 165 167 166 function create_object( $args ) { 167 if ( empty( $args['sender_id'] ) ) { 168 $args['sender_id'] = $this->factory->user->create(); 169 } 170 171 if ( empty( $args['recipients'] ) ) { 172 $args['recipients'] = $this->factory->user->create(); 173 } 174 168 175 $message_id = messages_new_message( $args ); 169 176 return $message_id; 170 177 } 171 178 172 function update_object( $ group_id, $fields ) {179 function update_object( $message_id, $fields ) { 173 180 // todo 174 181 } 175 182 176 function get_object_by_id( $ group_id ) {177 // todo183 function get_object_by_id( $message_id ) { 184 return new BP_Messages_Message( $message_id ); 178 185 } 179 186 } 180 187