@@ -486,19 +486,21 @@ public function testFlatFollowUnfollowKeepHistory()
486486
487487 public function testFlatFollowUnfollowPrivate ()
488488 {
489- $ id = $ this ->generateGuid ();
490-
491- $ secret = $ this ->client ->feed ('secret ' , $ id );
492- $ this ->user1 ->unfollow ('secret ' , $ id );
493- $ activity_data = ['actor ' => 1 , 'verb ' => 'tweet ' , 'object ' => 1 ];
494- $ response = $ secret ->addActivity ($ activity_data );
495- $ activity_id = $ response ['id ' ];
496- $ this ->user1 ->follow ('secret ' , $ id );
497- sleep (2 );
498- $ activities = $ this ->user1 ->getActivities (0 , 1 )['results ' ];
499- $ this ->assertCount (1 , $ activities );
500- $ this ->assertSame ($ activity_id , $ activities [0 ]['id ' ]);
501- $ this ->user1 ->unfollow ('secret ' , $ id );
489+ if (!str_contains (getenv ('STREAM_BASE_URL ' ), 'localhost ' )) {
490+ $ id = $ this ->generateGuid ();
491+
492+ $ secret = $ this ->client ->feed ('secret ' , $ id );
493+ $ this ->user1 ->unfollow ('secret ' , $ id );
494+ $ activity_data = ['actor ' => 1 , 'verb ' => 'tweet ' , 'object ' => 1 ];
495+ $ response = $ secret ->addActivity ($ activity_data );
496+ $ activity_id = $ response ['id ' ];
497+ $ this ->user1 ->follow ('secret ' , $ id );
498+ sleep (2 );
499+ $ activities = $ this ->user1 ->getActivities (0 , 1 )['results ' ];
500+ $ this ->assertCount (1 , $ activities );
501+ $ this ->assertSame ($ activity_id , $ activities [0 ]['id ' ]);
502+ $ this ->user1 ->unfollow ('secret ' , $ id );
503+ }
502504 }
503505
504506 public function testGet ()
@@ -745,15 +747,15 @@ public function testUpdateActivitiesToRemoveTarget()
745747 $ activities = [
746748 [
747749 'actor ' => 'actor ' , 'verb ' => 'tweet ' , 'object ' => 1 ,
748- 'to ' => ["flat: $ { target}" ], 'time ' => $ time ,
750+ 'to ' => ["flat: { $ target }" ], 'time ' => $ time ,
749751 'foreign_id ' => 'fid1 ' ,
750752 ],
751753 ];
752754 $ feed ->addActivities ($ activities );
753755 $ response = $ this ->client ->feed ('flat ' , $ target )->getActivities ();
754756 $ this ->assertCount (1 , $ response ['results ' ]);
755757
756- $ feed ->updateActivityToTargets ('fid1 ' , $ time , [], [], ["flat: $ { target}" ]);
758+ $ feed ->updateActivityToTargets ('fid1 ' , $ time , [], [], ["flat: { $ target }" ]);
757759
758760 $ response = $ this ->client ->feed ('flat ' , $ target )->getActivities ();
759761 $ this ->assertCount (0 , $ response ['results ' ]);
@@ -775,7 +777,7 @@ public function testUpdateActivitiesToAddTarget()
775777 $ response = $ this ->client ->feed ('flat ' , $ target )->getActivities ();
776778 $ this ->assertCount (0 , $ response ['results ' ]);
777779
778- $ feed ->updateActivityToTargets ('fid1 ' , $ time , [], ["flat: $ { target}" ], []);
780+ $ feed ->updateActivityToTargets ('fid1 ' , $ time , [], ["flat: { $ target }" ], []);
779781
780782 $ response = $ this ->client ->feed ('flat ' , $ target )->getActivities ();
781783 $ this ->assertCount (1 , $ response ['results ' ]);
@@ -791,7 +793,7 @@ public function testUpdateActivitiesToAddRemoveTarget()
791793 $ activities = [
792794 [
793795 'actor ' => 'actor ' , 'verb ' => 'tweet ' , 'object ' => 1 ,
794- 'to ' => ["flat: $ { target1}" ], 'time ' => $ time ,
796+ 'to ' => ["flat: { $ target1 }" ], 'time ' => $ time ,
795797 'foreign_id ' => 'fid1 ' ,
796798 ],
797799 ];
@@ -800,7 +802,7 @@ public function testUpdateActivitiesToAddRemoveTarget()
800802 $ response = $ this ->client ->feed ('flat ' , $ target1 )->getActivities ();
801803 $ this ->assertCount (1 , $ response ['results ' ]);
802804
803- $ feed ->updateActivityToTargets ('fid1 ' , $ time , [], ["flat: $ { target2}" ], ["flat: $ { target1}" ]);
805+ $ feed ->updateActivityToTargets ('fid1 ' , $ time , [], ["flat: { $ target2 }" ], ["flat: { $ target1 }" ]);
804806 sleep (2 );
805807
806808 $ response = $ this ->client ->feed ('flat ' , $ target1 )->getActivities ();
@@ -820,7 +822,7 @@ public function testUpdateActivitiesToReplaceTargets()
820822 $ activities = [
821823 [
822824 'actor ' => 'actor ' , 'verb ' => 'tweet ' , 'object ' => 1 ,
823- 'to ' => ["flat: $ { target1}" ], 'time ' => $ time ,
825+ 'to ' => ["flat: { $ target1 }" ], 'time ' => $ time ,
824826 'foreign_id ' => 'fid1 ' ,
825827 ],
826828 ];
@@ -829,7 +831,7 @@ public function testUpdateActivitiesToReplaceTargets()
829831 $ response = $ this ->client ->feed ('flat ' , $ target1 )->getActivities ();
830832 $ this ->assertCount (1 , $ response ['results ' ]);
831833
832- $ feed ->updateActivityToTargets ('fid1 ' , $ time , ["flat: $ { target2}" ]);
834+ $ feed ->updateActivityToTargets ('fid1 ' , $ time , ["flat: { $ target2 }" ]);
833835
834836 $ response = $ this ->client ->feed ('flat ' , $ target1 )->getActivities ();
835837 $ this ->assertCount (0 , $ response ['results ' ]);
0 commit comments