File tree Expand file tree Collapse file tree 9 files changed +180
-7
lines changed Expand file tree Collapse file tree 9 files changed +180
-7
lines changed Original file line number Diff line number Diff line change 4
4
- 5.4
5
5
- 5.5
6
6
- 5.6
7
- - hhvm
8
- - nightly
7
+
8
+ script : php tests/runAll.php
9
9
10
10
sudo : false
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /* Copyright 2015 Tristian Flanagan
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ $ response = $ qb ->api ('API_AddField ' , array (
19
+ 'dbid ' => getenv ('dbid ' ),
20
+ 'label ' => 'Test Field ' ,
21
+ 'type ' => 'text '
22
+ ));
23
+
24
+ $ qb ->api ('API_DeleteField ' , array (
25
+ 'dbid ' => getenv ('dbid ' ),
26
+ 'fid ' => $ response ['fid ' ]
27
+ ));
28
+
29
+ ?>
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /* Copyright 2015 Tristian Flanagan
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ $ response = $ qb ->api ('API_AddRecord ' , array (
19
+ 'dbid ' => getenv ('dbid ' )
20
+ ));
21
+
22
+ $ qb ->api ('API_DeleteRecord ' , array (
23
+ 'dbid ' => getenv ('dbid ' ),
24
+ 'rid ' => $ response ['rid ' ]
25
+ ));
26
+
27
+ ?>
Original file line number Diff line number Diff line change 15
15
* limitations under the License.
16
16
*/
17
17
18
- $ response = $ qb ->api ('API_Authenticate ' , array (
19
- 'username ' => '' ,
20
- 'password ' => ''
18
+ $ qb ->api ('API_Authenticate ' , array (
19
+ 'username ' => getenv ( ' username ' ) ,
20
+ 'password ' => getenv ( ' password ' )
21
21
));
22
22
23
- ?>
23
+ ?>
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /* Copyright 2015 Tristian Flanagan
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ $ qb ->api ('API_DoQuery ' , array (
19
+ 'dbid ' => getenv ('dbid ' ),
20
+ 'query ' => "{'3'.XEX.''} "
21
+ ));
22
+
23
+ ?>
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /* Copyright 2015 Tristian Flanagan
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ $ qb ->api ('API_DoQueryCount ' , array (
19
+ 'dbid ' => getenv ('dbid ' ),
20
+ 'query ' => "{'3'.XEX.''} "
21
+ ));
22
+
23
+ ?>
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /* Copyright 2015 Tristian Flanagan
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ $ qb ->api ('API_GetSchema ' , array (
19
+ 'dbid ' => getenv ('dbid ' )
20
+ ));
21
+
22
+ ?>
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /* Copyright 2015 Tristian Flanagan
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ $ qb ->api ('API_GetUserInfo ' );
19
+
20
+ ?>
Original file line number Diff line number Diff line change 31
31
$ stderr = fopen ('php://stderr ' , 'w+ ' );
32
32
$ error = false ;
33
33
34
- $ qb = new QuickBase ();
34
+ if (!getenv ('TRAVIS ' )){
35
+ if (count ($ argv ) !== 6 ){
36
+ echo implode ("\n" , array (
37
+ 'ERROR: Incorrect CL Test Usage. ' ,
38
+ '' ,
39
+ "\t$ php tests \\runAll.php <realm> <username> <password> <appToken> <dbid> " ,
40
+ '' ,
41
+ "\trealm: www " ,
42
+ "\tusername: foo@bar.com " ,
43
+ "\tpassword: foobar " ,
44
+ "\tappToken: dn23iuct88jvbcx7v9vttp2an6 " ,
45
+ "\tdbid: bkcamms4m " ,
46
+ "\t (must be a table dbid, not an application dbid) " ,
47
+ ''
48
+ ));
49
+
50
+ exit (1 );
51
+ }
52
+
53
+ putenv ('realm= ' .$ argv [1 ]);
54
+ putenv ('username= ' .$ argv [2 ]);
55
+ putenv ('password= ' .$ argv [3 ]);
56
+ putenv ('appToken= ' .$ argv [4 ]);
57
+ putenv ('dbid= ' .$ argv [5 ]);
58
+ }
59
+
60
+ $ qb = new QuickBase (array (
61
+ 'realm ' => getenv ('realm ' ),
62
+ 'appToken ' => getenv ('appToken ' )
63
+ ));
35
64
36
65
/* Main */
37
66
$ files = array_diff (scandir (__DIR__ ), array (
You can’t perform that action at this time.
0 commit comments