1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
use PHPUnit\Framework\TestCase; |
4
|
|
|
|
5
|
|
|
|
6
|
|
|
/** |
7
|
|
|
* Class CommonTestClass |
8
|
|
|
* The structure for mocking and configuration seems so complicated, but it's necessary to let it be totally idiot-proof |
9
|
|
|
*/ |
10
|
|
|
class CommonTestClass extends TestCase |
11
|
|
|
{ |
12
|
|
|
protected function sourceRows(): array |
13
|
|
|
{ |
14
|
|
|
return [ |
15
|
|
|
['abc' => 1, 'def' => 'dave', 'ghi' => 'any', 'jkl' => 123, 'mno' => false, 'pqr' => true], |
16
|
|
|
['abc' => 2, 'def' => 'john', 'ghi' => 'one', 'jkl' => 456, 'mno' => false, 'pqr' => false], |
17
|
|
|
['abc' => 3, 'def' => 'emil', 'ghi' => 'any', 'jkl' => 789, 'mno' => true, 'pqr' => true], |
18
|
|
|
['abc' => 4, 'def' => 'josh', 'ghi' => 'any', 'jkl' => 101, 'mno' => true, 'pqr' => false], |
19
|
|
|
['abc' => 5, 'def' => 'ewan', 'ghi' => 'one', 'jkl' => 112, 'mno' => false, 'pqr' => false], |
20
|
|
|
['abc' => 6, 'def' => 'kami', 'ghi' => 'any', 'jkl' => 131, 'mno' => true, 'pqr' => false], |
21
|
|
|
['abc' => 7, 'def' => 'chuck', 'ghi' => 'one', 'jkl' => 415, 'mno' => false, 'pqr' => true], |
22
|
|
|
['abc' => 8, 'def' => 'phil', 'ghi' => 'any', 'jkl' => 161, 'mno' => true, 'pqr' => true], |
23
|
|
|
['abc' => 9, 'def' => 'wayne', 'ghi' => 'any', 'jkl' => 718, 'mno' => false, 'pqr' => false], |
24
|
|
|
]; |
25
|
|
|
} |
26
|
|
|
} |
27
|
|
|
|