Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/03/2016 11:35:25 PM (4 years ago)
Author:
djpaul
Message:

Tests, Emails: update some tests for recent email type change.

In the real world, the activity-at-message email type always has the poster.name token set prior to the call to bp_send_email(), which isn't what we're testing here; so we need to set it here as it's used in an action provided for backwards compatibility.

See #6592

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/core/class-bp-email.php

    r10503 r10505  
    3535        $email   = new BP_Email( 'activity-at-message' );
    3636
    37         $email->set_subject( $message );
     37        $email->set_subject( $message )->set_tokens( array( 'poster.name' => 'example' ) );
    3838        $this->assertSame( $message, $email->get_subject() );
    3939    }
     
    9595        $email = new BP_Email( 'activity-at-message' );
    9696        $email->set_from( 'test1@example.com' )->set_to( 'test2@example.com' )->set_subject( 'testing' );
    97         $email->set_content_html( 'testing' );
     97        $email->set_content_html( 'testing' )->set_tokens( array( 'poster.name' => 'example' ) );
    9898
    9999        $this->assertTrue( $email->validate() );
     
    144144        $email  = new BP_Email( 'activity-at-message' );
    145145        $email->set_from( 'test1@example.com' )->set_to( 'test2@example.com' )->set_subject( 'testing' );  // Content
     146        $email->set_tokens( array( 'poster.name' => 'example' ) );
    146147        $result = $email->validate();
    147148
     
    153154        $email  = new BP_Email( 'activity-at-message' );
    154155        $email->set_from( 'test1@example.com' )->set_to( 'test2@example.com' )->set_subject( 'testing' );
    155         $email->set_content_html( 'testing' )->set_template( '' );
     156        $email->set_content_html( 'testing' )->set_tokens( array( 'poster.name' => 'example' ) )->set_template( '' );
    156157        $result = $email->validate();
    157158
Note: See TracChangeset for help on using the changeset viewer.