f276baf68a0cc2d99acae05f59e5a8f6ecbc9b42
[civicrm-core.git] / tests / phpunit / api / v4 / Mock / Api4 / Action / MockArrayEntity / Get.php
1 <?php
2
3 namespace Civi\Api4\Action\MockArrayEntity;
4
5 /**
6 * This class demonstrates how the getRecords method of Basic\Get can be overridden.
7 */
8 class Get extends \Civi\Api4\Generic\BasicGetAction {
9
10 public function getRecords() {
11 return [
12 [
13 'field1' => 1,
14 'field2' => 'zebra',
15 'field3' => NULL,
16 'field4' => [1, 2, 3],
17 'field5' => 'apple',
18 ],
19 [
20 'field1' => 2,
21 'field2' => 'yack',
22 'field3' => 0,
23 'field4' => [2, 3, 4],
24 'field5' => 'banana',
25 'field6' => '',
26 ],
27 [
28 'field1' => 3,
29 'field2' => 'x ray',
30 'field4' => [3, 4, 5],
31 'field5' => 'banana',
32 'field6' => 0,
33 ],
34 [
35 'field1' => 4,
36 'field2' => 'wildebeest',
37 'field3' => 1,
38 'field4' => [4, 5, 6],
39 'field5' => 'apple',
40 'field6' => '0',
41 ],
42 [
43 'field1' => 5,
44 'field2' => 'vole',
45 'field3' => 1,
46 'field4' => [4, 5, 6],
47 'field5' => 'apple',
48 'field6' => 0,
49 ],
50 ];
51 }
52
53 }