2525 *
2626 * @author Kalmer Kaurson <kalmerkaurson@gmail.com>
2727 */
28- class InfoActionTest extends TestCase
28+ final class InfoActionTest extends TestCase
2929{
3030 public function testWaitingCount (): void
3131 {
3232 $ controller = $ this ->getMockBuilder (Controller::class)
3333 ->setConstructorArgs (['testController ' , new Module ('testModule ' )])
3434 ->getMock ();
3535
36- $ controller ->expects (self ::exactly (3 ))
36+ $ controller
37+ ->expects ($ this ->exactly (3 ))
3738 ->method ('stdout ' )
3839 ->willReturnOnConsecutiveCalls (
3940 [
@@ -54,11 +55,15 @@ public function testWaitingCount(): void
5455 $ provider = $ this ->getMockBuilder (WaitingCountProvider::class)
5556 ->setConstructorArgs ([$ queue ])
5657 ->getMock ();
57- $ provider ->expects (self ::once ())
58+ $ provider
59+ ->expects ($ this ->once ())
5860 ->method ('getWaitingCount ' )
5961 ->willReturn (10 );
6062
61- $ queue ->method ('getStatisticsProvider ' )->willReturn ($ provider );
63+ $ queue
64+ ->expects ($ this ->once ())
65+ ->method ('getStatisticsProvider ' )
66+ ->willReturn ($ provider );
6267
6368 $ action = (new InfoAction ('infoAction ' , $ controller , [
6469 'queue ' => $ queue ,
@@ -72,7 +77,8 @@ public function testDelayedCount(): void
7277 ->setConstructorArgs (['testController ' , new Module ('testModule ' )])
7378 ->getMock ();
7479
75- $ controller ->expects (self ::exactly (3 ))
80+ $ controller
81+ ->expects ($ this ->exactly (3 ))
7682 ->method ('stdout ' )
7783 ->willReturnOnConsecutiveCalls (
7884 [
@@ -93,11 +99,15 @@ public function testDelayedCount(): void
9399 $ provider = $ this ->getMockBuilder (DelayedCountProvider::class)
94100 ->setConstructorArgs ([$ queue ])
95101 ->getMock ();
96- $ provider ->expects (self ::once ())
102+ $ provider
103+ ->expects ($ this ->once ())
97104 ->method ('getDelayedCount ' )
98105 ->willReturn (10 );
99106
100- $ queue ->method ('getStatisticsProvider ' )->willReturn ($ provider );
107+ $ queue
108+ ->expects ($ this ->once ())
109+ ->method ('getStatisticsProvider ' )
110+ ->willReturn ($ provider );
101111
102112 $ action = (new InfoAction ('infoAction ' , $ controller , [
103113 'queue ' => $ queue ,
@@ -111,7 +121,8 @@ public function testReservedCount(): void
111121 ->setConstructorArgs (['testController ' , new Module ('testModule ' )])
112122 ->getMock ();
113123
114- $ controller ->expects (self ::exactly (3 ))
124+ $ controller
125+ ->expects ($ this ->exactly (3 ))
115126 ->method ('stdout ' )
116127 ->willReturnOnConsecutiveCalls (
117128 [
@@ -133,11 +144,15 @@ public function testReservedCount(): void
133144 ->setConstructorArgs ([$ queue ])
134145 ->getMock ()
135146 ;
136- $ provider ->expects (self ::once ())
147+ $ provider
148+ ->expects ($ this ->once ())
137149 ->method ('getReservedCount ' )
138150 ->willReturn (10 );
139151
140- $ queue ->method ('getStatisticsProvider ' )->willReturn ($ provider );
152+ $ queue
153+ ->expects ($ this ->once ())
154+ ->method ('getStatisticsProvider ' )
155+ ->willReturn ($ provider );
141156
142157 $ action = (new InfoAction ('infoAction ' , $ controller , [
143158 'queue ' => $ queue ,
@@ -151,7 +166,8 @@ public function testDoneCount(): void
151166 ->setConstructorArgs (['testController ' , new Module ('testModule ' )])
152167 ->getMock ();
153168
154- $ controller ->expects (self ::exactly (3 ))
169+ $ controller
170+ ->expects ($ this ->exactly (3 ))
155171 ->method ('stdout ' )
156172 ->willReturnOnConsecutiveCalls (
157173 [
@@ -172,11 +188,15 @@ public function testDoneCount(): void
172188 $ provider = $ this ->getMockBuilder (DoneCountProvider::class)
173189 ->setConstructorArgs ([$ queue ])
174190 ->getMock ();
175- $ provider ->expects (self ::once ())
191+ $ provider
192+ ->expects ($ this ->once ())
176193 ->method ('getDoneCount ' )
177194 ->willReturn (10 );
178195
179- $ queue ->method ('getStatisticsProvider ' )->willReturn ($ provider );
196+ $ queue
197+ ->expects ($ this ->once ())
198+ ->method ('getStatisticsProvider ' )
199+ ->willReturn ($ provider );
180200
181201 $ action = (new InfoAction ('infoAction ' , $ controller , [
182202 'queue ' => $ queue ,
0 commit comments