Passage en Namespace et tous les tests fonctionnels OK

This commit is contained in:
2021-05-10 11:48:15 +02:00
parent 536dd0d56b
commit eb30d8ef97
56 changed files with 1091 additions and 964 deletions

View File

@@ -7,19 +7,21 @@
namespace Domframework\Tests;
use Domframework\Xmppclient;
/** Test the domframework xmppclient part */
class xmppclientTest extends \PHPUnit_Framework_TestCase
{
public function test_connection_BADNAME ()
{
$this->expectException ("Exception");
$xmppclient = new xmppclient ();
$xmppclient = new Xmppclient ();
$res = $xmppclient->connect ("NOTFOUND.fournier38.fr", 5222, "", "");
}
public function test_connection_authenticate_1 ()
{
$xmppclient = new xmppclient ();
$xmppclient = new Xmppclient ();
$res = $xmppclient->connect ("xmpp.fournier38.fr", 5222,
"testxmpp@xmpp.fournier38.fr", "LSqmBXDUZWxk");
$this->assertSame (is_object ($res), true);
@@ -27,7 +29,7 @@ class xmppclientTest extends \PHPUnit_Framework_TestCase
public function test_connection_disco_1 ()
{
$xmppclient = new xmppclient ();
$xmppclient = new Xmppclient ();
$xmppclient->connect ("xmpp.fournier38.fr", 5222,
"testxmpp@xmpp.fournier38.fr", "LSqmBXDUZWxk");
$res = $xmppclient->discoveryService ();
@@ -36,7 +38,7 @@ class xmppclientTest extends \PHPUnit_Framework_TestCase
public function test_connection_sendMessage_1 ()
{
$xmppclient = new xmppclient ();
$xmppclient = new Xmppclient ();
$xmppclient->connect ("xmpp.fournier38.fr", 5222,
"testxmpp@xmpp.fournier38.fr", "LSqmBXDUZWxk");
$res = $xmppclient->sendMessagePrivate ("dominique@fournier38.fr",
@@ -46,7 +48,7 @@ class xmppclientTest extends \PHPUnit_Framework_TestCase
public function test_connection_sendMessage_2 ()
{
$xmppclient = new xmppclient ();
$xmppclient = new Xmppclient ();
$xmppclient->connect ("xmpp.fournier38.fr", 5222,
"testxmpp@xmpp.fournier38.fr", "LSqmBXDUZWxk");
$res = $xmppclient->sendMessagePrivate ("dominique@fournier38.fr",