Skip to content

Commit 4427780

Browse files
Nyholmnicolas-grekas
authored andcommitted
Small update in our internal terminology
1 parent 4601375 commit 4427780

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

NoPrivateNetworkHttpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function request(string $method, string $url, array $options = []): Respo
8181
$options['on_progress'] = function (int $dlNow, int $dlSize, array $info) use ($onProgress, $subnets, &$lastPrimaryIp): void {
8282
if ($info['primary_ip'] !== $lastPrimaryIp) {
8383
if (IpUtils::checkIp($info['primary_ip'], $subnets ?? self::PRIVATE_SUBNETS)) {
84-
throw new TransportException(sprintf('IP "%s" is blacklisted for "%s".', $info['primary_ip'], $info['url']));
84+
throw new TransportException(sprintf('IP "%s" is blocked for "%s".', $info['primary_ip'], $info['url']));
8585
}
8686

8787
$lastPrimaryIp = $info['primary_ip'];

Tests/NoPrivateNetworkHttpClientTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
class NoPrivateNetworkHttpClientTest extends TestCase
2424
{
25-
public function getBlacklistData(): array
25+
public function getExcludeData(): array
2626
{
2727
return [
2828
// private
@@ -63,16 +63,16 @@ public function getBlacklistData(): array
6363
}
6464

6565
/**
66-
* @dataProvider getBlacklistData
66+
* @dataProvider getExcludeData
6767
*/
68-
public function testBlacklist(string $ipAddr, $subnets, bool $mustThrow)
68+
public function testExclude(string $ipAddr, $subnets, bool $mustThrow)
6969
{
7070
$content = 'foo';
7171
$url = sprintf('http://%s/', 0 < substr_count($ipAddr, ':') ? sprintf('[%s]', $ipAddr) : $ipAddr);
7272

7373
if ($mustThrow) {
7474
$this->expectException(TransportException::class);
75-
$this->expectExceptionMessage(sprintf('IP "%s" is blacklisted for "%s".', $ipAddr, $url));
75+
$this->expectExceptionMessage(sprintf('IP "%s" is blocked for "%s".', $ipAddr, $url));
7676
}
7777

7878
$previousHttpClient = $this->getHttpClientMock($url, $ipAddr, $content);

0 commit comments

Comments
 (0)