@@ -21,7 +21,6 @@ protected function setUp(): void
21
21
22
22
$ this ->components = $ this ->getMockBuilder (Factory::class)
23
23
->disableOriginalConstructor ()
24
- ->addMethods (['info ' , 'warn ' ])
25
24
->getMock ();
26
25
27
26
$ this ->relay = $ this ->getMockBuilder (MutexRelay::class)
@@ -31,18 +30,18 @@ protected function setUp(): void
31
30
32
31
public function testStart (): void
33
32
{
34
- $ this ->components ->expects ($ this ->exactly (2 ))->method ('info ' );
33
+ $ this ->components ->expects ($ this ->exactly (2 ))->method ('__call ' );
35
34
36
35
$ this ->relay ->expects ($ this ->once ())
37
36
->method ('acquireLock ' )
38
- ->will ( $ this -> returnValue ( true ) );
37
+ ->willReturn ( true );
39
38
40
39
$ this ->getProcessorInstance ()->start ();
41
40
}
42
41
43
42
public function testStartThrowsSpecificException (): void
44
43
{
45
- $ this ->components ->expects ($ this ->once ())->method ('info ' );
44
+ $ this ->components ->expects ($ this ->once ())->method ('__call ' );
46
45
47
46
$ this ->relay ->expects ($ this ->once ())
48
47
->method ('acquireLock ' )
@@ -55,11 +54,11 @@ public function testStartThrowsSpecificException(): void
55
54
56
55
public function testTerminate (): void
57
56
{
58
- $ this ->components ->expects ($ this ->once ())->method ('info ' );
57
+ $ this ->components ->expects ($ this ->once ())->method ('__call ' );
59
58
60
59
$ this ->relay ->expects ($ this ->once ())
61
60
->method ('releaseLock ' )
62
- ->will ( $ this -> returnValue ( true ) );
61
+ ->willReturn ( true );
63
62
64
63
$ this ->getProcessorInstance ()->terminate ();
65
64
}
0 commit comments