| Total Complexity | 4 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | class TaskTest extends TestCase |
||
| 18 | { |
||
| 19 | /** @var Task */ |
||
| 20 | private Task $task; |
||
| 21 | |||
| 22 | /** @var Process|MockObject */ |
||
| 23 | private Process $processMock; |
||
| 24 | |||
| 25 | |||
| 26 | public function setUp(): void |
||
| 27 | { |
||
| 28 | $this->processMock = $this->createMock(Process::class); |
||
| 29 | |||
| 30 | $this->task = new Task( |
||
| 31 | $this->processMock, |
||
| 32 | new Encoder(), |
||
| 33 | 1 |
||
| 34 | ); |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @test |
||
| 39 | */ |
||
| 40 | public function isRunning(): void |
||
| 41 | { |
||
| 42 | $this->processMock->expects(static::once()) |
||
|
1 ignored issue
–
show
|
|||
| 43 | ->method('isRunning') |
||
| 44 | ->willReturn(true); |
||
| 45 | |||
| 46 | static::assertTrue($this->task->isRunning()); |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @test |
||
| 51 | */ |
||
| 52 | public function isSuccessful(): void |
||
| 53 | { |
||
| 54 | $this->processMock->expects(static::once()) |
||
| 55 | ->method('isSuccessful') |
||
| 56 | ->willReturn(true); |
||
| 57 | |||
| 58 | static::assertTrue($this->task->isSuccessful()); |
||
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @test |
||
| 63 | */ |
||
| 64 | public function isTerminated(): void |
||
| 71 | } |
||
| 72 | } |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.