Skip to content

Commit 0ecbb27

Browse files
author
Yoann MOROCUTTI
committed
test(Unit/Service/Downloader/ReactDownloaderTest.php): Remove dynamic call to static method when doing assertion
[repman-http-proxy]
1 parent 8cf7db4 commit 0ecbb27

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

tests/Unit/Service/Downloader/ReactDownloaderTest.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ public function testStreamContext(): void
7070

7171
$context = $createContextMethod->invoke($downloader, 'https://repman.io');
7272
$options = stream_context_get_options($context);
73-
$this->assertEquals(20, $options['http']['max_redirects']);
74-
$this->assertEquals(1, $options['http']['follow_location']);
75-
$this->assertEquals(
73+
self::assertEquals(20, $options['http']['max_redirects']);
74+
self::assertEquals(1, $options['http']['follow_location']);
75+
self::assertEquals(
7676
sprintf(
7777
'User-Agent: Repman/%s (%s; %s; %s)',
7878
Kernel::REPMAN_VERSION,
@@ -82,7 +82,7 @@ public function testStreamContext(): void
8282
),
8383
$options['http']['header'][0]
8484
);
85-
$this->assertArrayNotHasKey('proxy', $options['http']);
85+
self::assertArrayNotHasKey('proxy', $options['http']);
8686
}
8787

8888
/**
@@ -98,9 +98,9 @@ public function testStreamContextHttpProxy(): void
9898

9999
$context = $createContextMethod->invoke($downloader, 'https://repman.io');
100100
$options = stream_context_get_options($context);
101-
$this->assertEquals(20, $options['http']['max_redirects']);
102-
$this->assertEquals(1, $options['http']['follow_location']);
103-
$this->assertEquals(
101+
self::assertEquals(20, $options['http']['max_redirects']);
102+
self::assertEquals(1, $options['http']['follow_location']);
103+
self::assertEquals(
104104
sprintf(
105105
'User-Agent: Repman/%s (%s; %s; %s)',
106106
Kernel::REPMAN_VERSION,
@@ -110,7 +110,7 @@ public function testStreamContextHttpProxy(): void
110110
),
111111
$options['http']['header'][0]
112112
);
113-
$this->assertEquals('tcp://proxy.repman.io:80', $options['http']['proxy']);
113+
self::assertEquals('tcp://proxy.repman.io:80', $options['http']['proxy']);
114114
}
115115

116116
/**
@@ -127,9 +127,9 @@ public function testStreamContextNoProxy(): void
127127

128128
$context = $createContextMethod->invoke($downloader, 'https://repman.io');
129129
$options = stream_context_get_options($context);
130-
$this->assertEquals(20, $options['http']['max_redirects']);
131-
$this->assertEquals(1, $options['http']['follow_location']);
132-
$this->assertEquals(
130+
self::assertEquals(20, $options['http']['max_redirects']);
131+
self::assertEquals(1, $options['http']['follow_location']);
132+
self::assertEquals(
133133
sprintf(
134134
'User-Agent: Repman/%s (%s; %s; %s)',
135135
Kernel::REPMAN_VERSION,
@@ -139,6 +139,6 @@ public function testStreamContextNoProxy(): void
139139
),
140140
$options['http']['header'][0]
141141
);
142-
$this->assertArrayNotHasKey('proxy', $options['http']);
142+
self::assertArrayNotHasKey('proxy', $options['http']);
143143
}
144144
}

0 commit comments

Comments
 (0)