Skip to content

Commit 4ea332a

Browse files
committed
Update unit tests to reflect new Packagist p2 URL
1 parent 79ee52f commit 4ea332a

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,10 @@
4141
"scripts": {
4242
"lint": "vendor/bin/phpcs --standard=PSR12 src/",
4343
"test": "vendor/bin/phpspec run -f pretty"
44+
},
45+
"config": {
46+
"allow-plugins": {
47+
"php-http/discovery": true
48+
}
4449
}
4550
}

spec/Packagist/Api/ClientSpec.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ public function it_gets_composer_package_details(HttpClient $client, Factory $fa
106106
$response->getBody()->shouldBeCalled()->willReturn($body);
107107
$body->getContents()->shouldBeCalledTimes(2)->willReturn($data1, $data2);
108108

109-
$client->request('GET', 'https://packagist.org/p2/sylius/sylius.json')
109+
$client->request('GET', 'https://repo.packagist.org/p2/sylius/sylius.json')
110110
->shouldBeCalled()
111111
->willReturn($response);
112112

113-
$client->request('GET', 'https://packagist.org/p2/sylius/sylius~dev.json')
113+
$client->request('GET', 'https://repo.packagist.org/p2/sylius/sylius~dev.json')
114114
->shouldBeCalled()
115115
->willReturn($response);
116116

@@ -140,7 +140,7 @@ public function it_gets_composer_releases_package_details(HttpClient $client, Fa
140140
$response->getBody()->shouldBeCalled()->willReturn($body);
141141
$body->getContents()->shouldBeCalled()->willReturn($data);
142142

143-
$client->request('GET', 'https://packagist.org/p2/sylius/sylius.json')
143+
$client->request('GET', 'https://repo.packagist.org/p2/sylius/sylius.json')
144144
->shouldBeCalled()
145145
->willReturn($response);
146146

0 commit comments

Comments
 (0)