Tests are now compliant with php-cs-fixer (CamelCase for method, phpdoc valid)
This commit is contained in:
@@ -1,19 +1,22 @@
|
||||
<?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\Csrf;
|
||||
|
||||
/** Test the Csrf.php file */
|
||||
/**
|
||||
* Test the Csrf.php file
|
||||
*/
|
||||
class CsrfTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function test_csrf1()
|
||||
public function testCsrf1()
|
||||
{
|
||||
$csrf = new Csrf();
|
||||
$res = $csrf->createToken();
|
||||
@@ -21,7 +24,7 @@ class CsrfTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertSame(30, strlen($res));
|
||||
}
|
||||
|
||||
public function test_csrf2()
|
||||
public function testCsrf2()
|
||||
{
|
||||
$csrf = new Csrf();
|
||||
$res = $csrf->createToken();
|
||||
@@ -34,14 +37,14 @@ class CsrfTest extends \PHPUnit_Framework_TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function test_csrf3()
|
||||
public function testCsrf3()
|
||||
{
|
||||
$csrf = new Csrf();
|
||||
$this->setExpectedException("Exception");
|
||||
$res = $csrf->checkToken("NOT VALID TOKEN");
|
||||
}
|
||||
|
||||
public function test_csrf4()
|
||||
public function testCsrf4()
|
||||
{
|
||||
$csrf = new Csrf();
|
||||
$token = $csrf->createToken();
|
||||
@@ -49,7 +52,7 @@ class CsrfTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertSame(true, $res);
|
||||
}
|
||||
|
||||
public function test_csrf5()
|
||||
public function testCsrf5()
|
||||
{
|
||||
$csrf = new Csrf();
|
||||
$token = $csrf->createToken();
|
||||
@@ -57,7 +60,7 @@ class CsrfTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertSame(true, $res);
|
||||
}
|
||||
|
||||
public function test_csrf6()
|
||||
public function testCsrf6()
|
||||
{
|
||||
$csrf = new Csrf();
|
||||
$token = $csrf->createToken();
|
||||
@@ -65,14 +68,14 @@ class CsrfTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertSame($token, $res);
|
||||
}
|
||||
|
||||
public function test_csrf7()
|
||||
public function testCsrf7()
|
||||
{
|
||||
$csrf = new Csrf();
|
||||
$res = $csrf->getToken();
|
||||
$this->assertSame(30, strlen($res));
|
||||
}
|
||||
|
||||
public function test_csrf_multiple_1()
|
||||
public function testCsrfMultiple1()
|
||||
{
|
||||
$csrf1 = new Csrf();
|
||||
$token1 = $csrf1->createToken();
|
||||
@@ -84,14 +87,14 @@ class CsrfTest extends \PHPUnit_Framework_TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function test_csrf_multiple_extend_2()
|
||||
public function testCsrfMultipleExtend2()
|
||||
{
|
||||
$csrf = new Csrf();
|
||||
$res = $csrf->extendToken($GLOBALS["CSRFTEST-Token"]);
|
||||
$this->assertSame(true, $res);
|
||||
}
|
||||
|
||||
public function test_csrf_multiple_get()
|
||||
public function testCsrfMultipleGet()
|
||||
{
|
||||
$csrf1 = new Csrf();
|
||||
$token1 = $csrf1->createToken();
|
||||
|
||||
Reference in New Issue
Block a user