Bug71Test.php 535B

12345678910111213141516171819202122232425
  1. <?php
  2. require_once 'Swift/Tests/SwiftUnitTestCase.php';
  3. class Swift_Bug71Test extends Swift_Tests_SwiftUnitTestCase
  4. {
  5. private $_message;
  6. public function setUp()
  7. {
  8. $this->_message = new Swift_Message('test');
  9. }
  10. public function testCallingToStringAfterSettingNewBodyReflectsChanges()
  11. {
  12. $this->_message->setBody('BODY1');
  13. $this->assertPattern('/BODY1/', $this->_message->toString());
  14. $this->_message->setBody('BODY2');
  15. $this->assertPattern('/BODY2/', $this->_message->toString());
  16. }
  17. }