Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/30/2016 05:29:28 PM (5 years ago)
Author:
boonebgorges
Message:

Update Messages tests to work after the changes in [11042].

See #7234.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/messages/star.php

    r9951 r11044  
    1515
    1616        // create the thread
    17         $t1 = $this->factory->message->create( array(
     17        $message_1 = $this->factory->message->create_and_get( array(
    1818            'sender_id'  => $u1,
    1919            'recipients' => array( $u2 ),
     
    2222
    2323        // create a reply
    24         $this->factory->message->create( array(
    25             'thread_id'  => $t1,
     24        $message_2 = $this->factory->message->create_and_get( array(
     25            'thread_id'  => $message_1->thread_id,
    2626            'sender_id'  => $u2,
    2727            'recipients' => array( $u1 ),
     
    2929        ) );
    3030
    31         // grab the message ids as individual variables
    32         list( $m1, $m2 ) = $this->get_message_ids( $t1 );
     31        $m1 = $message_1->id;
     32        $m2 = $message_2->id;
    3333
    3434        // star the second message
     
    6363
    6464        // create the thread
    65         $t1 = $this->factory->message->create( array(
     65        $message_1 = $this->factory->message->create_and_get( array(
    6666            'sender_id'  => $u1,
    6767            'recipients' => array( $u2 ),
     
    7070
    7171        // create a reply
    72         $this->factory->message->create( array(
    73             'thread_id'  => $t1,
     72        $message_2 = $this->factory->message->create_and_get( array(
     73            'thread_id'  => $message_1->thread_id,
    7474            'sender_id'  => $u2,
    7575            'recipients' => array( $u1 ),
     
    7777        ) );
    7878
    79         // grab the message ids as individual variables
    80         list( $m1, $m2 ) = $this->get_message_ids( $t1 );
     79        $m1 = $message_1->id;
     80        $m2 = $message_2->id;
     81        $t1 = $message_1->thread_id;
    8182
    8283        // star all messages
     
    116117
    117118        // create three threads
    118         $t1 = $this->factory->message->create( array(
     119        $message_1 = $this->factory->message->create_and_get( array(
    119120            'sender_id'  => $u1,
    120121            'recipients' => array( $u2 ),
    121122            'subject'    => 'A',
    122123        ) );
    123         $t2 = $this->factory->message->create( array(
     124        $message_2 = $this->factory->message->create_and_get( array(
    124125            'sender_id'  => $u1,
    125126            'recipients' => array( $u2 ),
    126127            'subject'    => 'B',
    127128        ) );
    128         $t3 = $this->factory->message->create( array(
     129        $message_3 = $this->factory->message->create_and_get( array(
    129130            'sender_id'  => $u1,
    130131            'recipients' => array( $u2 ),
     
    133134
    134135        // grab the message ids as individual variables
    135         list( $m1 ) = $this->get_message_ids( $t1 );
    136         list( $m2 ) = $this->get_message_ids( $t2 );
    137         list( $m3 ) = $this->get_message_ids( $t3 );
     136        $m1 = $message_1->id;
     137        $m2 = $message_2->id;
     138        $m3 = $message_3->id;
     139
     140        $t2 = $message_2->thread_id;
    138141
    139142        // star all threads
Note: See TracChangeset for help on using the changeset viewer.