@@ -702,7 +702,37 @@ function testCreateCampaign($templateId) {
702
702
$ campaignID = $ result ->data ->id ;
703
703
return $ campaignID ;
704
704
}
705
-
705
+
706
+ /**
707
+ *
708
+ * test creating a campaign with UTF-8 characters
709
+ */
710
+
711
+ function testCreateCampaignUTF8 () {
712
+ $ post_params = array (
713
+ 'subject ' => 'Test Campaign created by API ' .time (),
714
+ 'fromfield ' =>
'From Name [email protected] ' ,
715
+ 'replyto ' => '' ,
716
+ 'message ' => '快速的棕色狐狸跳过懒狗 ' ,
717
+ 'textmessage ' => '快速的棕色狐狸跳过懒狗 ' ,
718
+ 'footer ' => 'Footer ' ,
719
+ 'status ' => 'submitted ' ,
720
+ 'sendformat ' => 'both ' ,
721
+ 'template ' => 0 ,
722
+ 'embargo ' => date ('Y-m-d ' ),
723
+ 'rsstemplate ' => '' ,
724
+ 'owner ' => 0 ,
725
+ 'htmlformatted ' => 1 ,
726
+ );
727
+
728
+ $ result = $ this ->callAPI ('campaignAdd ' , $ post_params );
729
+ $ this ->assertEquals ('success ' , $ result ->status );
730
+ $ campaignID = $ result ->data ->id ;
731
+ $ this ->assertEquals ($ result ->data ->message ,'快速的棕色狐狸跳过懒狗 ' );
732
+ return $ campaignID ;
733
+ }
734
+
735
+
706
736
/**
707
737
* update a campaign
708
738
* @depends testCreateCampaign
@@ -755,7 +785,7 @@ public function testCountCampaignsAgain($campaignCount)
755
785
756
786
$ result = $ this ->callAPI ('campaignsCount ' , $ post_params );
757
787
$ this ->assertEquals ('success ' , $ result ->status );
758
- $ this ->assertEquals ($ campaignCount +1 , $ result ->data ->total );
788
+ $ this ->assertEquals ($ campaignCount +2 , $ result ->data ->total );
759
789
$ campaignCount = $ result ->data ->total ;
760
790
761
791
return $ campaignCount ;
0 commit comments