Skip to content

Commit fe32412

Browse files
chore(deps): update dependency phpunit/phpunit to v11 (#74)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1 parent a6afd24 commit fe32412

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"phpstan/phpstan-deprecation-rules": "^1.0.0",
4141
"phpstan/phpstan-phpunit": "^1.1.0",
4242
"phpstan/phpstan-strict-rules": "^1.1.0",
43-
"phpunit/phpunit": "^10.1",
43+
"phpunit/phpunit": "^11.0",
4444
"psr/http-client": "^1.0",
4545
"psr/http-factory": "^1.0",
4646
"psr/http-message": "^2.0",

tests/Transport/SimpleBatchTest.php

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static function providerBatch(): iterable
3232
{
3333
$snmpClientFactory = static function (TestCase $testCase) {
3434
$snmpClient = $testCase->createMock(SnmpClient::class);
35-
$snmpClient->expects(self::once())->method('get')->with(['.1.2.3'])->willReturn(['.1.2.3' => 123]);
35+
$snmpClient->expects($testCase->once())->method('get')->with(['.1.2.3'])->willReturn(['.1.2.3' => 123]);
3636

3737
return $snmpClient;
3838
};
@@ -41,7 +41,11 @@ public static function providerBatch(): iterable
4141

4242
$snmpClientFactory = static function (TestCase $testCase) {
4343
$snmpClient = $testCase->createMock(SnmpClient::class);
44-
$snmpClient->expects(self::once())->method('getNext')->with(['.1.2.3'])->willReturn(['.1.2.3.1' => 1231]);
44+
$snmpClient
45+
->expects($testCase->once())
46+
->method('getNext')
47+
->with(['.1.2.3'])
48+
->willReturn(['.1.2.3.1' => 1231]);
4549

4650
return $snmpClient;
4751
};
@@ -50,7 +54,10 @@ public static function providerBatch(): iterable
5054

5155
$snmpClientFactory = static function (TestCase $testCase) {
5256
$snmpClient = $testCase->createMock(SnmpClient::class);
53-
$snmpClient->expects(self::once())->method('walk')->with('.1.2.3', 10)->willReturn(['.1.2.3.4.5' => 12345]);
57+
$snmpClient
58+
->expects($testCase->once())->method('walk')
59+
->with('.1.2.3', 10)
60+
->willReturn(['.1.2.3.4.5' => 12345]);
5461

5562
return $snmpClient;
5663
};
@@ -60,14 +67,14 @@ public static function providerBatch(): iterable
6067
$snmpClientFactory = static function (TestCase $testCase) {
6168
$snmpClient = $testCase->createMock(SnmpClient::class);
6269
$snmpClient
63-
->expects(self::once())
70+
->expects($testCase->once())
6471
->id('get')
6572
->method('get')
6673
->with(['.1.2.3', '.4.5.6'])
6774
->willReturn(['.1.2.3' => 123, '.4.5.6' => 456]);
6875

6976
$snmpClient
70-
->expects(self::exactly(2))
77+
->expects($testCase->exactly(2))
7178
->id('walk')
7279
->method('walk')
7380
->after('get')
@@ -79,7 +86,7 @@ public static function providerBatch(): iterable
7986
);
8087

8188
$snmpClient
82-
->expects(self::once())
89+
->expects($testCase->once())
8390
->after('walk')
8491
->method('getNext')
8592
->with(['.7.8.9'])
@@ -118,7 +125,7 @@ private function createBatchSnmpClient(SnmpClient $snmpClient): SnmpClient
118125
return new class ($snmpClient) implements SnmpClient {
119126
use SimpleBatch;
120127

121-
public function __construct(private SnmpClient $snmpClient)
128+
public function __construct(private readonly SnmpClient $snmpClient)
122129
{
123130
}
124131

0 commit comments

Comments
 (0)