@@ -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