Passage en Namespace et tous les tests fonctionnels OK
This commit is contained in:
@@ -7,20 +7,22 @@
|
||||
|
||||
namespace Domframework\Tests;
|
||||
|
||||
use Domframework\Authsympa;
|
||||
|
||||
/** Test the authentication on Sympa Service */
|
||||
class authsympaTest extends \PHPUnit_Framework_TestCase
|
||||
class AuthsympaTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function test_connect_1 ()
|
||||
{
|
||||
// Empty
|
||||
$authsympa = new authsympa ();
|
||||
$authsympa = new Authsympa ();
|
||||
$this->expectException ();
|
||||
$authsympa->connect ();
|
||||
}
|
||||
|
||||
public function test_connect_2 ()
|
||||
{
|
||||
$authsympa = new authsympa ();
|
||||
$authsympa = new Authsympa ();
|
||||
$authsympa->wsdl = "https://listes.grenoble.cnrs.fr/sympa/wsdl";
|
||||
$authsympa->connect ();
|
||||
$res = $authsympa->getDetails ();
|
||||
@@ -30,7 +32,7 @@ class authsympaTest extends \PHPUnit_Framework_TestCase
|
||||
public function test_auth_1 ()
|
||||
{
|
||||
// Invalid password
|
||||
$authsympa = new authsympa ();
|
||||
$authsympa = new Authsympa ();
|
||||
$authsympa->wsdl = "https://listes.grenoble.cnrs.fr/sympa/wsdl";
|
||||
$authsympa->list = "listtest@listes.grenoble.cnrs.fr";
|
||||
$authsympa->connect ();
|
||||
@@ -41,7 +43,7 @@ class authsympaTest extends \PHPUnit_Framework_TestCase
|
||||
public function test_auth_2 ()
|
||||
{
|
||||
// Unknown user
|
||||
$authsympa = new authsympa ();
|
||||
$authsympa = new Authsympa ();
|
||||
$authsympa->wsdl = "https://listes.grenoble.cnrs.fr/sympa/wsdl";
|
||||
$authsympa->list = "listtest@listes.grenoble.cnrs.fr";
|
||||
$authsympa->connect ();
|
||||
@@ -52,7 +54,7 @@ class authsympaTest extends \PHPUnit_Framework_TestCase
|
||||
public function test_auth_3 ()
|
||||
{
|
||||
// OK !
|
||||
$authsympa = new authsympa ();
|
||||
$authsympa = new Authsympa ();
|
||||
$authsympa->wsdl = "https://listes.grenoble.cnrs.fr/sympa/wsdl";
|
||||
$authsympa->list = "listtest@listes.grenoble.cnrs.fr";
|
||||
$authsympa->connect ();
|
||||
@@ -63,7 +65,7 @@ class authsympaTest extends \PHPUnit_Framework_TestCase
|
||||
public function test_auth_4 ()
|
||||
{
|
||||
// Unknown list
|
||||
$authsympa = new authsympa ();
|
||||
$authsympa = new Authsympa ();
|
||||
$authsympa->wsdl = "https://listes.grenoble.cnrs.fr/sympa/wsdl";
|
||||
$authsympa->list = "unknown@listes.grenoble.cnrs.fr";
|
||||
$authsympa->connect ();
|
||||
@@ -74,7 +76,7 @@ class authsympaTest extends \PHPUnit_Framework_TestCase
|
||||
public function test_auth_5 ()
|
||||
{
|
||||
// User not in list
|
||||
$authsympa = new authsympa ();
|
||||
$authsympa = new Authsympa ();
|
||||
$authsympa->wsdl = "https://listes.grenoble.cnrs.fr/sympa/wsdl";
|
||||
$authsympa->list = "admins@listes.grenoble.cnrs.fr";
|
||||
$authsympa->connect ();
|
||||
|
||||
Reference in New Issue
Block a user