* 			projet qui mappe le salon de discution à rendre inaccessible.
 * 		3 - le $user admin ici doit exister en tant que administrateur des projets correspondants qui existent déjà dans codendi. 
 * Post-conditions:
 * 		1 - les muc rooms unix-nameperf-test0,unix-nameperf-test1, unix-nameperf-test2 et unix-nameperf-test3 sont créés ainsi que les groupes partagés correspondants .avec les temps suivants :
 * 			->temps mis apres appel numéro 1 : 10.859273910522 s
 * 			->temps mis apres appel numéro 2 : 6.793231010437 s
 * 			->temps mis apres appel numéro 3 : 6.5583012104034 s
 * 			->temps mis apres appel numéro 4 : 7.0762600898743 s
 * 			-> Ce qui donne un temps total :31.287104129791 s
 * Pour confirmer les résultats on peut se rendre à l'url suivant (http://kilauea.grenoble.xrce.xerox.com:8017/plugins/IM/?view=codendi_im_admin ) ,avant et aprés l'exécution de ce script .
 */
require_once "../include/jabbex_api/Jabbex.php";
$jabex = new Jabbex("res_3271989");
$unix_name = "unix-nameperf-test";
$name = "name-perf-test";
$desc = "desc-perftest";
$user = "******";
$begin = microtime(true);
$deb = $begin;
$time = 0;
echo '\\n\\nDébut : ' . $begin;
for ($i = 0; $i < 4; $i++) {
    //create_muc_room($muc_room_short_name, $muc_room_full_name, $muc_room_description, $muc_room_owner_username)
    $jabex->create_muc_room($unix_name . $i, $name . $i, $desc . $i, $user);
    $jabex->create_shared_group($unix_name . $i, $name . $i);
    $time = microtime(true) - $deb;
    $deb = microtime(true);
    print '\\n\\n\\n temps mis apres appel numéro ' . ($i + 1) . ' : ' . $time;
}
$end = microtime(true) - $begin;
print "\n\n\ntemps total :" . $end . "\n";
示例#2
0
#!/usr/local/bin/php -q
<?php 
/*
 * Test ID: JBX_09
 * Test description: This test creates a MUC room and a shared group named "Crossing Alabama".
 * Pre-conditions:
 * 		1 - Jabbex must be properly configured to use your Jabber server;
 * 		2 - The room id xingalab must NOT exist;
 * 		3 - The default Jabbex JID must have permission to create a MUC room;
 * 		4 - No other connection of the default JID that uses resource res_398671989 must be active.
 * 		5 - The user "bbking" must exist in the server.
 * 		6 - The project id xingalab must exist in the Codendi environment;
 *		7 - The default Jabbex JID must have permission to create a shared group with the Helga plugin;
 * 		8 - The Helga plugin must be installed and JabbeX must be configured to properly use it; 
 * Post-conditions:
 * 		1 - The room xingalab is created with the name "Crossing Alabama" 
 * 			and the description "Here I put the description of my room (Projetc short description)" (no error or warning messages must be printed).
 * 		2 - The default JabbeX JID must be set as room owner and the user bbking must be set as room admin.
 * 		3 - The shared group corresponding to the project stub is set as "shared" with the name "Crossing Alabama";
 * 		4 - Jabbex closes the connection to the Jabber server.
 */
require_once "../Jabbex.php";
$jabex = new Jabbex("res_398671989");
$jabex->create_shared_group("xingalab", "Crossing Alabama");
$jabex->create_muc_room("xingalab", "Crossing Alabama", "Here I put the description of my room (Projetc short description)", "bbking");
#!/usr/local/bin/php -q
<?php 
/*
* Test ID: JBX_07
Test Description: Tries to create a shared group that maps to an invalid Codendi project.
Pre-conditions:
The Codendi project InvalidGroup_XXXAUTYS must NOT exist;

Post-conditions:
The fatal exception 3008 (The shared group you are trying to enable does not exist) must be thrown and the execution must be aborted.
*/
require_once "../Jabbex.php";
$jabex = new Jabbex("123654789");
$jabex->create_shared_group("InvalidGroup_XXXAUTYS", "XGREXDtTXRt");
// An invalid group.
示例#4
0
#!/usr/local/bin/php -q
<?php 
/*
 * Test ID: JBX_08
 * Test description: This test makes available a shared group named "My little stub project" with id "stub".
 * Pre-conditions:
 * 		1 - Jabbex must be properly configured to use your Jabber server;
 * 		2 - The project id stub must exist (and state = A) in the Codendi environment;
 * 		3 - The default Jabbex JID must have permission to create a shared group with the Helga plugin;
 * 		4 - The Helga plugin must be installed and JabbeX must be configured to properly use it;
 * 		5 - No other connection of the default JID that uses resource res_32723989 must be active.
 * 
 * Post-conditions:
 * 		1 - The shared group corresponding to the project stub is set as "shared" with the name "My little stub project";
 * 		3 - Jabbex closes the connection to the Jabber server.
 */
require_once "../Jabbex.php";
$jabex = new Jabbex("res_32723989");
$jabex->create_shared_group("stub", "My little stub project");
示例#5
0
#!/usr/local/bin/php -q
<?php 
/*
 * Test ID: JBX_14
 * Test description: This test instantiates several JabbeX objects and creates MUC rooms and a shared groups with them.
 * Pre-conditions:
 * 		- Check the pre-conditions for the tests CreateMUC and CreateSharedGroup.
 * Post-conditions:
 * 		- Check the pos-conditions for the tests CreateMUC and CreateSharedGroup.
 * 
 */
require_once "../Jabbex.php";
$jabex1 = new Jabbex("12364789");
$jabex2 = new Jabbex("12365478");
$jabex3 = new Jabbex("12365479");
$jabex4 = new Jabbex("12365489");
$jabex5 = new Jabbex("12365789");
$jabex1->create_shared_group("xingalab", "Crossing Alabama");
$jabex2->create_muc_room("xingalab", "My Xingalab Room (Project Name)", "Here I put the description of my room (Projetc short description)", "bbking");
$jabex5->__destruct();
$jabex4->create_shared_group("stubroom", "My little stub project");
$jabex3->create_muc_room("stubroom", "My Stub Room (Project Name)", "Here I put the description of my room (Projetc short description)", "bbking");