Tests are now compliant with php-cs-fixer (CamelCase for method, phpdoc valid)
This commit is contained in:
@@ -1,27 +1,30 @@
|
||||
<?php
|
||||
|
||||
/** DomFramework - Tests
|
||||
* @package domframework
|
||||
* @author Dominique Fournier <dominique@fournier38.fr>
|
||||
* @license BSD
|
||||
*/
|
||||
/**
|
||||
* DomFramework - Tests
|
||||
* @package domframework
|
||||
* @author Dominique Fournier <dominique@fournier38.fr>
|
||||
* @license BSD
|
||||
*/
|
||||
|
||||
namespace Domframework\Tests;
|
||||
|
||||
use Domframework\Authsympa;
|
||||
|
||||
/** Test the authentication on Sympa Service */
|
||||
/**
|
||||
* Test the authentication on Sympa Service
|
||||
*/
|
||||
class AuthsympaTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function test_connect_1()
|
||||
public function testConnect1()
|
||||
{
|
||||
// Empty
|
||||
// Empty
|
||||
$authsympa = new Authsympa();
|
||||
$this->expectException();
|
||||
$authsympa->connect();
|
||||
}
|
||||
|
||||
public function test_connect_2()
|
||||
public function testConnect2()
|
||||
{
|
||||
$authsympa = new Authsympa();
|
||||
$authsympa->wsdl = "https://listes.grenoble.cnrs.fr/sympa/wsdl";
|
||||
@@ -30,9 +33,9 @@ class AuthsympaTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertSame($res, null);
|
||||
}
|
||||
|
||||
public function test_auth_1()
|
||||
public function testAuth1()
|
||||
{
|
||||
// Invalid password
|
||||
// Invalid password
|
||||
$authsympa = new Authsympa();
|
||||
$authsympa->wsdl = "https://listes.grenoble.cnrs.fr/sympa/wsdl";
|
||||
$authsympa->list = "listtest@listes.grenoble.cnrs.fr";
|
||||
@@ -41,9 +44,9 @@ class AuthsympaTest extends \PHPUnit_Framework_TestCase
|
||||
$res = $authsympa->authentication("richard.heral@grenoble.cnrs.fr", "XXXX");
|
||||
}
|
||||
|
||||
public function test_auth_2()
|
||||
public function testAuth2()
|
||||
{
|
||||
// Unknown user
|
||||
// Unknown user
|
||||
$authsympa = new Authsympa();
|
||||
$authsympa->wsdl = "https://listes.grenoble.cnrs.fr/sympa/wsdl";
|
||||
$authsympa->list = "listtest@listes.grenoble.cnrs.fr";
|
||||
@@ -52,9 +55,9 @@ class AuthsympaTest extends \PHPUnit_Framework_TestCase
|
||||
$res = $authsympa->authentication("Unknown@grenoble.cnrs.fr", "XXXX");
|
||||
}
|
||||
|
||||
public function test_auth_3()
|
||||
public function testAuth3()
|
||||
{
|
||||
// OK !
|
||||
// OK !
|
||||
$authsympa = new Authsympa();
|
||||
$authsympa->wsdl = "https://listes.grenoble.cnrs.fr/sympa/wsdl";
|
||||
$authsympa->list = "listtest@listes.grenoble.cnrs.fr";
|
||||
@@ -63,9 +66,9 @@ class AuthsympaTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertSame($res, true);
|
||||
}
|
||||
|
||||
public function test_auth_4()
|
||||
public function testAuth4()
|
||||
{
|
||||
// Unknown list
|
||||
// Unknown list
|
||||
$authsympa = new Authsympa();
|
||||
$authsympa->wsdl = "https://listes.grenoble.cnrs.fr/sympa/wsdl";
|
||||
$authsympa->list = "unknown@listes.grenoble.cnrs.fr";
|
||||
@@ -74,9 +77,9 @@ class AuthsympaTest extends \PHPUnit_Framework_TestCase
|
||||
$res = $authsympa->authentication("richard.heral@grenoble.cnrs.fr", "Lavchdn8!");
|
||||
}
|
||||
|
||||
public function test_auth_5()
|
||||
public function testAuth5()
|
||||
{
|
||||
// User not in list
|
||||
// User not in list
|
||||
$authsympa = new Authsympa();
|
||||
$authsympa->wsdl = "https://listes.grenoble.cnrs.fr/sympa/wsdl";
|
||||
$authsympa->list = "admins@listes.grenoble.cnrs.fr";
|
||||
|
||||
Reference in New Issue
Block a user