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 44 - 5.4
55 - 5.5
66 - 5.6
7- - hhvm
8- - nightly
7+
8+ script : php tests/runAll.php
99
1010sudo : 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 1515 * limitations under the License.
1616*/
1717
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 ' )
2121));
2222
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 3131$ stderr = fopen ('php://stderr ' , 'w+ ' );
3232$ error = false ;
3333
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+ ));
3564
3665/* Main */
3766$ files = array_diff (scandir (__DIR__ ), array (
You can’t perform that action at this time.
0 commit comments