File tree 2 files changed +54
-0
lines changed 2 files changed +54
-0
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,34 @@ function testAlias() {
68
68
"userId " => "user-id "
69
69
)));
70
70
}
71
+
72
+ /**
73
+ * @expectedException \RuntimeException
74
+ */
75
+ function testLargeMessageSizeError () {
76
+ $ options = array (
77
+ "debug " => true ,
78
+ "consumer " => "lib_curl "
79
+ );
80
+
81
+ $ client = new Segment_Client ("testlargesize " , $ options );
82
+
83
+ $ big_property = "" ;
84
+
85
+ for ($ i = 0 ; $ i < 32 * 1024 ; $ i ++) {
86
+ $ big_property .= "a " ;
87
+ }
88
+
89
+ $ this ->assertTrue ($ client ->track (array (
90
+ "userId " => "some-user " ,
91
+ "event " => "Super Large PHP Event " ,
92
+ "properties " => array ("big_property " => $ big_property )
93
+ )));
94
+
95
+ $ client ->__destruct ();
96
+ }
97
+
98
+
71
99
}
72
100
73
101
?>
Original file line number Diff line number Diff line change @@ -135,6 +135,32 @@ function testLargeMessage () {
135
135
$ client ->__destruct ();
136
136
}
137
137
138
+ /**
139
+ * @expectedException \RuntimeException
140
+ */
141
+ function testLargeMessageSizeError () {
142
+ $ options = array (
143
+ "debug " => true ,
144
+ "consumer " => "socket "
145
+ );
146
+
147
+ $ client = new Segment_Client ("testlargesize " , $ options );
148
+
149
+ $ big_property = "" ;
150
+
151
+ for ($ i = 0 ; $ i < 32 * 1024 ; $ i ++) {
152
+ $ big_property .= "a " ;
153
+ }
154
+
155
+ $ this ->assertTrue ($ client ->track (array (
156
+ "userId " => "some-user " ,
157
+ "event " => "Super Large PHP Event " ,
158
+ "properties " => array ("big_property " => $ big_property )
159
+ )));
160
+
161
+ $ client ->__destruct ();
162
+ }
163
+
138
164
/**
139
165
* @expectedException \RuntimeException
140
166
*/
You can’t perform that action at this time.
0 commit comments