-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add basic support for Composer v2 * Add support for private packages
- Loading branch information
Showing
9 changed files
with
346 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,7 +77,8 @@ public function testOrganizationPackagesAction(): void | |
|
||
self::assertMatchesPattern(' | ||
{ | ||
"packages": {}, | ||
"packages": [], | ||
"metadata-url": "/p2/%package%.json", | ||
"notify-batch": "http://buddy.repo.repman.wip/downloads", | ||
"search": "https://packagist.org/search.json?q=%query%&type=%type%", | ||
"mirrors": [ | ||
|
@@ -160,4 +161,34 @@ public function testAnonymousUserAccess(): void | |
|
||
self::assertTrue($this->client->getResponse()->isOk()); | ||
} | ||
|
||
public function testProviderV2Action(): void | ||
{ | ||
$adminId = $this->createAndLoginAdmin('[email protected]', 'secret'); | ||
$this->fixtures->createToken($this->fixtures->createOrganization('buddy', $adminId), 'secret-org-token'); | ||
|
||
$this->client->request('GET', '/p2/buddy-works/repman.json', [], [], [ | ||
'HTTP_HOST' => 'buddy.repo.repman.wip', | ||
'PHP_AUTH_USER' => 'token', | ||
'PHP_AUTH_PW' => 'secret-org-token', | ||
]); | ||
|
||
self::assertTrue($this->client->getResponse()->isOk()); | ||
|
||
self::assertMatchesPattern(' | ||
{ | ||
"buddy-works/repman": { | ||
"1.2.3": { | ||
"version": "1.2.3", | ||
"version_normalized": "1.2.3.0", | ||
"dist": { | ||
"type": "zip", | ||
"url": "/path/to/reference.zip", | ||
"reference": "ac7dcaf888af2324cd14200769362129c8dd8550" | ||
} | ||
} | ||
} | ||
} | ||
', $this->client->getResponse()->getContent()); | ||
} | ||
} |
Oops, something went wrong.