@@ -962,9 +962,19 @@ public function testGetEventPullRequest(): void
962962 'sender ' => ['html_url ' => "{$ giteaUrl }/ " . self ::$ owner ],
963963 ]);
964964
965+ if ($ payload === false ) {
966+ $ this ->fail ('Failed to encode JSON payload ' );
967+ }
968+
965969 $ result = $ this ->vcsAdapter ->getEvent ('pull_request ' , $ payload );
966970
967971 $ this ->assertIsArray ($ result );
972+ $ this ->assertArrayHasKey ('branch ' , $ result );
973+ $ this ->assertArrayHasKey ('pullRequestNumber ' , $ result );
974+ $ this ->assertArrayHasKey ('action ' , $ result );
975+ $ this ->assertArrayHasKey ('commitHash ' , $ result );
976+ $ this ->assertArrayHasKey ('external ' , $ result );
977+
968978 $ this ->assertSame ('feature-branch ' , $ result ['branch ' ]);
969979 $ this ->assertSame ($ prNumber , $ result ['pullRequestNumber ' ]);
970980 $ this ->assertSame ('opened ' , $ result ['action ' ]);
@@ -1018,6 +1028,10 @@ public function testGetEventPullRequestExternal(): void
10181028 'sender ' => ['html_url ' => "{$ giteaUrl }/external-user " ],
10191029 ]);
10201030
1031+ if ($ payload === false ) {
1032+ $ this ->fail ('Failed to encode JSON payload ' );
1033+ }
1034+
10211035 $ result = $ this ->vcsAdapter ->getEvent ('pull_request ' , $ payload );
10221036
10231037 $ this ->assertTrue ($ result ['external ' ]);
0 commit comments