Tests are now compliant with php-cs-fixer (CamelCase for method, phpdoc valid)
This commit is contained in:
@@ -1,50 +1,53 @@
|
||||
<?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\Auth;
|
||||
|
||||
/** Test the authentication */
|
||||
/**
|
||||
* Test the authentication
|
||||
*/
|
||||
class AuthTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function test_page_1()
|
||||
public function testPage1()
|
||||
{
|
||||
$auth = new Auth();
|
||||
$res = $auth->pageHTML("http://localhost");
|
||||
$this->assertSame(!! strpos($res, "<form "), true);
|
||||
}
|
||||
|
||||
public function test_Message()
|
||||
public function testMessage()
|
||||
{
|
||||
$auth = new Auth();
|
||||
$res = $auth->pageHTML("http://localhost", "MESSAGE");
|
||||
$this->assertSame(!! strpos($res, "MESSAGE"), true);
|
||||
}
|
||||
|
||||
public function test_URL_1()
|
||||
public function testURL1()
|
||||
{
|
||||
$auth = new Auth();
|
||||
$res = $auth->pageHTML("http://localhost", "MESSAGE", "URL/TEST");
|
||||
$this->assertSame(!! strpos($res, "URL/TEST"), true);
|
||||
}
|
||||
|
||||
public function test_alreadyAuth_1()
|
||||
public function testAlreadyAuth1()
|
||||
{
|
||||
// Not Authenticated
|
||||
// Not Authenticated
|
||||
$auth = new Auth();
|
||||
$res = $auth->pageHTML("http://localhost", "MESSAGE", "URL/TEST", false);
|
||||
$this->assertSame(!! strpos($res, "Please sign in"), true);
|
||||
}
|
||||
|
||||
public function test_alreadyAuth_2()
|
||||
public function testAlreadyAuth2()
|
||||
{
|
||||
// Authenticated
|
||||
// Authenticated
|
||||
$auth = new Auth();
|
||||
$res = $auth->pageHTML("http://localhost", "", "", "AUTHENTICATED USER");
|
||||
$this->assertSame(!! strpos($res, "AUTHENTICATED USER"), true);
|
||||
|
||||
Reference in New Issue
Block a user