-
Notifications
You must be signed in to change notification settings - Fork 588
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
0008967: Allow to set a leader on a project using XML-RPC API - PHP C…
…LIENT SAMPLES
- Loading branch information
Showing
2 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
/** | ||
* TestLink Open Source Project - http://testlink.sourceforge.net/ | ||
* This script is distributed under the GNU General Public License 2 or later. | ||
* | ||
* @filesource clientGetProjectPlatforms | ||
* @Author: francisco.mancardi@gmail.com | ||
* | ||
*/ | ||
require_once 'util.php'; | ||
require_once 'sample.inc.php'; | ||
show_api_db_sample_msg(); | ||
|
||
|
||
$method='createUser'; | ||
$test_num=0; | ||
$tlDevKey = 'dev01'; | ||
$tlDevKey = isset($_REQUEST['apiKey']) ? $_REQUEST['apiKey'] : $tlDevKey; | ||
|
||
|
||
// ------------------------------------------------ | ||
$test_num++; | ||
$unitTestDescription="Test {$test_num} - {$method}"; | ||
|
||
$args=array(); | ||
$args["devKey"]=$tlDevKey; | ||
$args["login"] = 'ZTZ'; | ||
$args["firstname"] = 'first name'; | ||
$args["lastname"] = 'last name'; | ||
$args["email"] = 'email@email.com'; | ||
$args["password"] = 'OPTIONAL'; | ||
|
||
$additionalInfo = ''; | ||
|
||
$debug=true; | ||
echo $unitTestDescription; | ||
echo $additionalInfo; | ||
|
||
$client = new IXR_Client($server_url); | ||
$client->debug=$debug; | ||
|
||
runTest($client,$method,$args,$test_num); | ||
|
42 changes: 42 additions & 0 deletions
42
lib/api/xmlrpc/v1/sample_clients/php/clientSetUserRoleOnProject.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
/** | ||
* TestLink Open Source Project - http://testlink.sourceforge.net/ | ||
* This script is distributed under the GNU General Public License 2 or later. | ||
* | ||
* @filesource clientGetProjectPlatforms | ||
* @Author: francisco.mancardi@gmail.com | ||
* | ||
*/ | ||
require_once 'util.php'; | ||
require_once 'sample.inc.php'; | ||
show_api_db_sample_msg(); | ||
|
||
|
||
$method='setUserRoleOnProject'; | ||
$test_num=0; | ||
$tlDevKey = 'dev01'; | ||
$tlDevKey = isset($_REQUEST['apiKey']) ? $_REQUEST['apiKey'] : $tlDevKey; | ||
|
||
|
||
// ------------------------------------------------ | ||
$test_num++; | ||
$unitTestDescription="Test {$test_num} - {$method}"; | ||
|
||
$args=array(); | ||
$args["devKey"]=$tlDevKey; | ||
$args["userid"] = 59; | ||
$args["rolename"] = 'leader'; | ||
$args["testprojectid"] = 69; | ||
|
||
|
||
$additionalInfo = ''; | ||
|
||
$debug=true; | ||
echo $unitTestDescription; | ||
echo $additionalInfo; | ||
|
||
$client = new IXR_Client($server_url); | ||
$client->debug=$debug; | ||
|
||
runTest($client,$method,$args,$test_num); | ||
|