File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
test/integration/Downloading Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 2929 env :
3030 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3131 - uses : actions/checkout@v4
32+ - run : composer config --global github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
3233 # temporarily remove Psalm until ready for PHP 8.4
3334 - name : remove psalm
3435 if : matrix.php-versions == '8.4'
Original file line number Diff line number Diff line change 2323use PHPUnit \Framework \Attributes \CoversClass ;
2424use PHPUnit \Framework \TestCase ;
2525
26+ use function getenv ;
27+ use function is_string ;
28+
2629#[CoversClass(GithubPackageReleaseAssets::class)]
2730final class GithubPackageReleaseAssetsTest extends TestCase
2831{
@@ -59,7 +62,16 @@ public function testDeterminingReleaseAssetUrlForWindows(): void
5962 99 ,
6063 );
6164
62- $ io = $ this ->createMock (IOInterface::class);
65+ $ io = $ this ->createMock (IOInterface::class);
66+
67+ $ githubToken = getenv ('GITHUB_TOKEN ' );
68+ if (is_string ($ githubToken ) && $ githubToken !== '' ) {
69+ $ io ->method ('hasAuthentication ' )
70+ ->willReturn (true );
71+ $ io ->method ('getAuthentication ' )
72+ ->willReturn (['username ' => $ githubToken , 'password ' => 'x-oauth-basic ' ]);
73+ }
74+
6375 $ config = new Config ();
6476
6577 self ::assertSame (
You can’t perform that action at this time.
0 commit comments