File tree Expand file tree Collapse file tree 1 file changed +57
-1
lines changed Expand file tree Collapse file tree 1 file changed +57
-1
lines changed Original file line number Diff line number Diff line change 31
31
throw new Exception ('Mismatched API_AddRecord Data Structure ' );
32
32
}
33
33
34
+ $ rid = $ actual ['rid ' ];
35
+
36
+ $ expected = array (
37
+ 'action ' => 'API_GetRecordInfo ' ,
38
+ 'errcode ' => 0 ,
39
+ 'errtext ' => 'No error ' ,
40
+ 'rid ' => 0 ,
41
+ 'num_fields ' => 0 ,
42
+ 'update_id ' => 0 ,
43
+ 'field ' => array (
44
+ array (
45
+ 'fid ' => 0 ,
46
+ 'name ' => '' ,
47
+ 'type ' => '' ,
48
+ 'value ' => 0 ,
49
+ 'printable ' => ''
50
+ ),
51
+ array (
52
+ 'fid ' => 0 ,
53
+ 'name ' => '' ,
54
+ 'type ' => '' ,
55
+ 'value ' => 0 ,
56
+ 'printable ' => ''
57
+ ),
58
+ array (
59
+ 'fid ' => 0 ,
60
+ 'name ' => '' ,
61
+ 'type ' => '' ,
62
+ 'value ' => 0
63
+ ),
64
+ array (
65
+ 'fid ' => 0 ,
66
+ 'name ' => '' ,
67
+ 'type ' => '' ,
68
+ 'value ' => '' ,
69
+ 'printable ' => ''
70
+ ),
71
+ array (
72
+ 'fid ' => 0 ,
73
+ 'name ' => '' ,
74
+ 'type ' => '' ,
75
+ 'value ' => '' ,
76
+ 'printable ' => ''
77
+ )
78
+ )
79
+ );
80
+
81
+ $ actual = $ qb ->api ('API_GetRecordInfo ' , array (
82
+ 'dbid ' => getenv ('dbid ' ),
83
+ 'rid ' => $ rid
84
+ ));
85
+
86
+ if (!objStrctMatch ($ actual , $ expected )){
87
+ throw new Exception ('Mismatched API_GetRecordInfo Data Structure ' );
88
+ }
89
+
34
90
$ expected = array (
35
91
'action ' => 'API_DeleteRecord ' ,
36
92
'errcode ' => 0 ,
40
96
41
97
$ actual = $ qb ->api ('API_DeleteRecord ' , array (
42
98
'dbid ' => getenv ('dbid ' ),
43
- 'rid ' => $ actual [ ' rid ' ]
99
+ 'rid ' => $ rid
44
100
));
45
101
46
102
if (!objStrctMatch ($ actual , $ expected )){
You can’t perform that action at this time.
0 commit comments