Changeset 10482 for trunk/tests/phpunit/testcases/core/class-bp-email.php
- Timestamp:
- 01/30/2016 08:39:59 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/core/class-bp-email.php
r10481 r10482 223 223 $this->assertSame( $user3, $addresses[2]->get_address() ); 224 224 } 225 226 public function test_replacing_existing_recipients_with_new_recipients() { 227 $email = new BP_Email( 'fake_type' ); 228 $original_recipient = 'test1@example.com'; 229 $new_recipient = 'test2@example.com'; 230 231 $email->set_to( $original_recipient ); 232 $addresses = $email->get_to(); 233 $this->assertSame( $original_recipient, $addresses[0]->get_address() ); 234 235 $email->set_to( $new_recipient ); 236 $addresses = $email->get_to(); 237 $this->assertSame( $new_recipient, $addresses[0]->get_address() ); 238 } 239 240 public function test_appending_new_recipients_to_existing_recipients() { 241 $email = new BP_Email( 'fake_type' ); 242 $original_recipient = 'test1@example.com'; 243 $new_recipient = 'test2@example.com'; 244 245 $email->set_to( $original_recipient ); 246 $addresses = $email->get_to(); 247 $this->assertSame( $original_recipient, $addresses[0]->get_address() ); 248 249 $email->set_to( $new_recipient, '', 'add' ); 250 $addresses = $email->get_to(); 251 $this->assertSame( $original_recipient, $addresses[0]->get_address() ); 252 $this->assertSame( $new_recipient, $addresses[1]->get_address() ); 253 } 225 254 }
Note: See TracChangeset
for help on using the changeset viewer.