@@ -219,18 +219,19 @@ public function testBugWithLabelsNotInRepositoryLabelList()
219219
220220 $ this ->dispatcher ->dispatch ($ event , GitHubEvents::PULL_REQUEST );
221221 $ responseData = $ event ->getResponseData ();
222-
222+
223+ // The bug would cause this to be '[Platform] [Agent] Foo Bar'
223224 // because the labels are added with concatenation but not recognized
224225 // for removal from the title
225226 $ this ->assertCount (2 , $ responseData );
226227 $ this ->assertSame (1234 , $ responseData ['pull_request ' ]);
227-
228+
228229 // This is what SHOULD happen (labels concatenated without spaces)
229230 $ this ->assertSame ('[Agent][Platform] Foo Bar ' , $ responseData ['new_title ' ]);
230231 }
231232
232233 /**
233- * Test that ensures no spaces are ever added between label brackets
234+ * Test that ensures no spaces are ever added between label brackets.
234235 */
235236 public function testNoSpacesBetweenLabelBrackets ()
236237 {
@@ -246,15 +247,15 @@ public function testNoSpacesBetweenLabelBrackets()
246247
247248 $ this ->dispatcher ->dispatch ($ event , GitHubEvents::PULL_REQUEST );
248249 $ responseData = $ event ->getResponseData ();
249-
250+
250251 // Should produce labels without spaces and no trailing space
251252 $ this ->assertCount (2 , $ responseData );
252253 $ this ->assertSame (1234 , $ responseData ['pull_request ' ]);
253254 $ this ->assertSame ('[Console][FrameworkBundle] ' , $ responseData ['new_title ' ]);
254255 }
255256
256257 /**
257- * Test when title has unrecognized bracketed text like [Foo] that isn't a label
258+ * Test when title has unrecognized bracketed text like [Foo] that isn't a label.
258259 */
259260 public function testUnrecognizedBracketedTextWithNewLabel ()
260261 {
@@ -268,7 +269,7 @@ public function testUnrecognizedBracketedTextWithNewLabel()
268269
269270 $ this ->dispatcher ->dispatch ($ event , GitHubEvents::PULL_REQUEST );
270271 $ responseData = $ event ->getResponseData ();
271-
272+
272273 // Currently produces: [Console] [Foo] Bar (with space)
273274 // Should produce: [Console][Foo] Bar (no space between brackets)
274275 $ this ->assertCount (2 , $ responseData );
@@ -277,7 +278,7 @@ public function testUnrecognizedBracketedTextWithNewLabel()
277278 }
278279
279280 /**
280- * Test multiple unrecognized bracketed texts with real labels
281+ * Test multiple unrecognized bracketed texts with real labels.
281282 */
282283 public function testMultipleUnrecognizedBracketsWithRealLabels ()
283284 {
@@ -292,7 +293,7 @@ public function testMultipleUnrecognizedBracketsWithRealLabels()
292293
293294 $ this ->dispatcher ->dispatch ($ event , GitHubEvents::PULL_REQUEST );
294295 $ responseData = $ event ->getResponseData ();
295-
296+
296297 // Should keep unrecognized brackets but without spaces between any brackets
297298 $ this ->assertCount (2 , $ responseData );
298299 $ this ->assertSame (1234 , $ responseData ['pull_request ' ]);
0 commit comments