@@ -458,9 +458,14 @@ public function testGetContributorsDecodesResponseToArray()
458458
459459 array_walk ($ contributors , function ($ contributor ) {
460460 $ this ->assertInternalType ('array ' , $ contributor );
461- $ this ->assertArrayHasKey ('login ' , $ contributor );
462- $ this ->assertArrayHasKey ('avatar_url ' , $ contributor );
463- $ this ->assertArrayHasKey ('html_url ' , $ contributor );
461+ $ this ->assertArrayHasKey ('author ' , $ contributor );
462+
463+ $ author = $ contributor ['author ' ];
464+
465+ $ this ->assertInternalType ('array ' , $ author );
466+ $ this ->assertArrayHasKey ('login ' , $ author );
467+ $ this ->assertArrayHasKey ('avatar_url ' , $ author );
468+ $ this ->assertArrayHasKey ('html_url ' , $ author );
464469 });
465470 }
466471
@@ -515,15 +520,20 @@ public function testGetContributorsReturnsContributorsInReverseOrder()
515520 $ expectedContributor = array_pop ($ contributorsAsReturned );
516521
517522 $ this ->assertInternalType ('array ' , $ contributor );
523+ $ this ->assertArrayHasKey ('author ' , $ contributor );
524+
525+ $ author = $ contributor ['author ' ];
526+
527+ $ this ->assertInternalType ('array ' , $ author );
518528
519- $ this ->assertArrayHasKey ('login ' , $ contributor );
520- $ this ->assertSame ($ expectedContributor ->login , $ contributor ['login ' ]);
529+ $ this ->assertArrayHasKey ('login ' , $ author );
530+ $ this ->assertSame ($ expectedContributor ->author -> login , $ author ['login ' ]);
521531
522- $ this ->assertArrayHasKey ('avatar_url ' , $ contributor );
523- $ this ->assertSame ($ expectedContributor ->avatar_url , $ contributor ['avatar_url ' ]);
532+ $ this ->assertArrayHasKey ('avatar_url ' , $ author );
533+ $ this ->assertSame ($ expectedContributor ->author -> avatar_url , $ author ['avatar_url ' ]);
524534
525- $ this ->assertArrayHasKey ('html_url ' , $ contributor );
526- $ this ->assertSame ($ expectedContributor ->html_url , $ contributor ['html_url ' ]);
535+ $ this ->assertArrayHasKey ('html_url ' , $ author );
536+ $ this ->assertSame ($ expectedContributor ->author -> html_url , $ author ['html_url ' ]);
527537 });
528538 }
529539
0 commit comments