Changeset 8504
- Timestamp:
- 06/13/2014 03:39:31 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/factory.php
r8125 r8504 8 8 $this->activity = new BP_UnitTest_Factory_For_Activity( $this ); 9 9 $this->group = new BP_UnitTest_Factory_For_Group( $this ); 10 $this->message = new BP_UnitTest_Factory_For_Message( $this ); 10 11 $this->xprofile_group = new BP_UnitTest_Factory_For_XProfileGroup( $this ); 11 12 $this->xprofile_field = new BP_UnitTest_Factory_For_XProfileField( $this ); … … 100 101 } 101 102 103 class BP_UnitTest_Factory_For_Message extends WP_UnitTest_Factory_For_Thing { 104 105 function __construct( $factory = null ) { 106 parent::__construct( $factory ); 107 108 $this->default_generation_definitions = array( 109 'sender_id' => get_current_user_id(), 110 'thread_id' => 0, 111 'recipients' => array(), 112 'subject' => new WP_UnitTest_Generator_Sequence( 'Message subject %s' ), 113 'content' => new WP_UnitTest_Generator_Sequence( 'Message content %s' ), 114 'date_sent' => bp_core_current_time(), 115 ); 116 } 117 118 function create_object( $args ) { 119 $message_id = messages_new_message( $args ); 120 return $message_id; 121 } 122 123 function update_object( $group_id, $fields ) { 124 // todo 125 } 126 127 function get_object_by_id( $group_id ) { 128 // todo 129 } 130 } 131 102 132 class BP_UnitTest_Factory_For_XProfileGroup extends WP_UnitTest_Factory_For_Thing { 103 133
Note: See TracChangeset
for help on using the changeset viewer.