Skip to content

Commit d6b39ba

Browse files
committed
tests: fixed tests to work with new data structure
1 parent fef07af commit d6b39ba

File tree

7 files changed

+93
-13
lines changed

7 files changed

+93
-13
lines changed

tests/API_DoQuery.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
'qname' => '',
2424
'table' => array(
2525
'name' => '',
26+
'desc' => '',
2627
'original' => array(
2728
'table_id' => '',
2829
'app_id' => '',

tests/API_FindDBByName.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
/* Main */
2727
$actual = $qb->api('API_FindDBByName', array(
28-
'dbname' => 'Node-QuickBase'
28+
'dbname' => 'Tristian\'s Application'
2929
));
3030

3131
if(!objStrctMatch($actual, $expected)){

tests/API_GetAppDTMInfo.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@
2727
'id' => ''
2828
),
2929
'tables' => array(
30+
array(
31+
'lastModifiedTime' => 0,
32+
'lastRecModTime' => 0,
33+
'id' => ''
34+
),
35+
array(
36+
'lastModifiedTime' => 0,
37+
'lastRecModTime' => 0,
38+
'id' => ''
39+
),
3040
array(
3141
'lastModifiedTime' => 0,
3242
'lastRecModTime' => 0,

tests/API_GetRoleInfo.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,24 @@
2727
'id' => 0,
2828
'name' => ''
2929
)
30-
), array(
30+
),
31+
array(
3132
'id' => 0,
3233
'name' => '',
3334
'access' => array(
3435
'id' => 0,
3536
'name' => ''
3637
)
37-
), array(
38+
),
39+
array(
40+
'id' => 0,
41+
'name' => '',
42+
'access' => array(
43+
'id' => 0,
44+
'name' => ''
45+
)
46+
),
47+
array(
3848
'id' => 0,
3949
'name' => '',
4050
'access' => array(

tests/API_GetSchema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
'date_format' => '',
2424
'table' => array(
2525
'name' => '',
26+
'desc' => '',
2627
'original' => array(
2728
'table_id' => '',
2829
'app_id' => '',
@@ -183,7 +184,6 @@
183184
));
184185

185186
if(!objStrctMatch($actual, $expected)){
186-
var_dump($actual, $expected);
187187
throw new Exception('Mismatched API_GetSchema Data Structure');
188188
}
189189

tests/API_UserRoles.php

Lines changed: 67 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,30 +28,88 @@
2828
'lastName' => '',
2929
'roles' => array(
3030
array(
31-
'id' => 0,
3231
'name' => '',
3332
'access' => array(
34-
'id' => 0,
35-
'name' => ''
36-
)
33+
'name' => '',
34+
'id' => 0
35+
),
36+
'id' => 0
3737
)
3838
),
3939
'type' => '',
4040
'id' => ''
41-
), array(
41+
),
42+
array(
43+
'name' => '',
44+
'lastAccess' => 0,
45+
'lastAccessAppLocal' => '',
46+
'firstName' => '',
47+
'lastName' => '',
48+
'roles' => array(
49+
array(
50+
'name' => '',
51+
'access' => array(
52+
'name' => '',
53+
'id' => 0
54+
),
55+
'id' => 0
56+
)
57+
),
58+
'type' => '',
59+
'id' => ''
60+
),
61+
array(
62+
'name' => '',
63+
'lastAccess' => 0,
64+
'lastAccessAppLocal' => '',
65+
'firstName' => '',
66+
'lastName' => '',
67+
'roles' => array(
68+
array(
69+
'name' => '',
70+
'access' => array(
71+
'name' => '',
72+
'id' => 0
73+
),
74+
'id' => 0
75+
)
76+
),
77+
'type' => '',
78+
'id' => ''
79+
),
80+
array(
81+
'name' => '',
82+
'lastAccess' => 0,
83+
'lastAccessAppLocal' => '',
84+
'firstName' => '',
85+
'lastName' => '',
86+
'roles' => array(
87+
array(
88+
'name' => '',
89+
'access' => array(
90+
'name' => '',
91+
'id' => 0
92+
),
93+
'id' => 0
94+
)
95+
),
96+
'type' => '',
97+
'id' => ''
98+
),
99+
array(
42100
'name' => '',
43101
'lastAccess' => 0,
44102
'lastAccessAppLocal' => '',
45103
'firstName' => '',
46104
'lastName' => '',
47105
'roles' => array(
48106
array(
49-
'id' => 0,
50107
'name' => '',
51108
'access' => array(
52-
'id' => 0,
53-
'name' => ''
54-
)
109+
'name' => '',
110+
'id' => 0
111+
),
112+
'id' => 0
55113
)
56114
),
57115
'type' => '',

tests/curl_multi.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
'qname' => '',
2424
'table' => array(
2525
'name' => '',
26+
'desc' => '',
2627
'original' => array(
2728
'table_id' => '',
2829
'app_id' => '',

0 commit comments

Comments
 (0)