| Total Complexity | 2 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | class OuvrageCompleteWorkerTest extends TestCase |
||
| 24 | { |
||
| 25 | protected function setUp(): void |
||
| 26 | { |
||
| 27 | // todo check ENV |
||
| 28 | //$this->markTestSkipped('all tests in this file are inactive for this server configuration!'); |
||
| 29 | } |
||
| 30 | |||
| 31 | public function testRun() |
||
| 32 | { |
||
| 33 | $DbAdapterMock = $this->createMock(DbAdapter::class); |
||
| 34 | $DbAdapterMock->method('getNewRaw')->willReturn( |
||
| 35 | ['page' => 'bla', 'raw' => '{{Ouvrage |auteur=Pierre André|titre=Bla|}}'] |
||
| 36 | ); |
||
| 37 | $DbAdapterMock->method('sendCompletedData')->willReturn(true); |
||
| 38 | |||
| 39 | $complete = new OuvrageCompleteWorker($DbAdapterMock); |
||
| 40 | |||
| 41 | $this::assertSame( |
||
| 42 | true, |
||
| 43 | $complete->run(1) |
||
| 44 | ); |
||
| 48 |