You've already forked postfixadmin
mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2025-07-28 11:41:57 +03:00
phpcs wants to change ...
This commit is contained in:
@ -1,7 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
class AdminHandler extends PFAHandler {
|
class AdminHandler extends PFAHandler
|
||||||
|
{
|
||||||
protected $db_table = 'admin';
|
protected $db_table = 'admin';
|
||||||
protected $id_field = 'username';
|
protected $id_field = 'username';
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
class AdminpasswordHandler extends PFAHandler {
|
class AdminpasswordHandler extends PFAHandler
|
||||||
|
{
|
||||||
protected $db_table = 'admin';
|
protected $db_table = 'admin';
|
||||||
protected $id_field = 'username';
|
protected $id_field = 'username';
|
||||||
|
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
/**
|
/**
|
||||||
* Handlers User level alias actions - e.g. add alias, get aliases, update etc.
|
* Handlers User level alias actions - e.g. add alias, get aliases, update etc.
|
||||||
*/
|
*/
|
||||||
class AliasHandler extends PFAHandler {
|
class AliasHandler extends PFAHandler
|
||||||
|
{
|
||||||
protected $db_table = 'alias';
|
protected $db_table = 'alias';
|
||||||
protected $id_field = 'address';
|
protected $id_field = 'address';
|
||||||
protected $domain_field = 'domain';
|
protected $domain_field = 'domain';
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
/**
|
/**
|
||||||
* Handlers User level alias actions - e.g. add alias, get aliases, update etc.
|
* Handlers User level alias actions - e.g. add alias, get aliases, update etc.
|
||||||
*/
|
*/
|
||||||
class AliasdomainHandler extends PFAHandler {
|
class AliasdomainHandler extends PFAHandler
|
||||||
|
{
|
||||||
protected $db_table = 'alias_domain';
|
protected $db_table = 'alias_domain';
|
||||||
protected $id_field = 'alias_domain';
|
protected $id_field = 'alias_domain';
|
||||||
protected $domain_field = 'alias_domain';
|
protected $domain_field = 'alias_domain';
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
* class to handle 'delete' in Cli
|
* class to handle 'delete' in Cli
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class CliDelete extends Shell {
|
class CliDelete extends Shell
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execution method always used for tasks
|
* Execution method always used for tasks
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
*
|
*
|
||||||
* extends the "Shell" class
|
* extends the "Shell" class
|
||||||
*/
|
*/
|
||||||
class CliEdit extends Shell {
|
class CliEdit extends Shell
|
||||||
|
{
|
||||||
public $handler_to_use = "";
|
public $handler_to_use = "";
|
||||||
public $new = 0;
|
public $new = 0;
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
class CliHelp extends Shell {
|
class CliHelp extends Shell
|
||||||
|
{
|
||||||
public $handler_to_use = "__not_set__";
|
public $handler_to_use = "__not_set__";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
* extends the "Shell" class
|
* extends the "Shell" class
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class CliScheme extends Shell {
|
class CliScheme extends Shell
|
||||||
|
{
|
||||||
public $handler_to_use = "";
|
public $handler_to_use = "";
|
||||||
public $new = 0;
|
public $new = 0;
|
||||||
|
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
* class to handle 'view' in Cli
|
* class to handle 'view' in Cli
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class CliView extends Shell {
|
class CliView extends Shell
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execution method always used for tasks
|
* Execution method always used for tasks
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
|
|
||||||
# This class is too static - if you inherit a class from it, it will share the static $instance and all its contents
|
# This class is too static - if you inherit a class from it, it will share the static $instance and all its contents
|
||||||
# Therefore the class is marked as final to prevent someone accidently does this ;-)
|
# Therefore the class is marked as final to prevent someone accidently does this ;-)
|
||||||
final class Config {
|
final class Config
|
||||||
|
{
|
||||||
private static $instance = null;
|
private static $instance = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
/**
|
/**
|
||||||
* Handlers User level alias actions - e.g. add alias, get aliases, update etc.
|
* Handlers User level alias actions - e.g. add alias, get aliases, update etc.
|
||||||
*/
|
*/
|
||||||
class DomainHandler extends PFAHandler {
|
class DomainHandler extends PFAHandler
|
||||||
|
{
|
||||||
protected $db_table = 'domain';
|
protected $db_table = 'domain';
|
||||||
protected $id_field = 'domain';
|
protected $id_field = 'domain';
|
||||||
protected $domain_field = 'domain';
|
protected $domain_field = 'domain';
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
/**
|
/**
|
||||||
* Handler for fetchmail jobs
|
* Handler for fetchmail jobs
|
||||||
*/
|
*/
|
||||||
class FetchmailHandler extends PFAHandler {
|
class FetchmailHandler extends PFAHandler
|
||||||
|
{
|
||||||
protected $db_table = 'fetchmail';
|
protected $db_table = 'fetchmail';
|
||||||
protected $id_field = 'id';
|
protected $id_field = 'id';
|
||||||
protected $domain_field = 'domain';
|
protected $domain_field = 'domain';
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class Login {
|
class Login
|
||||||
|
{
|
||||||
private $key_table;
|
private $key_table;
|
||||||
private $table;
|
private $table;
|
||||||
|
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
/**
|
/**
|
||||||
* Simple class to represent a user.
|
* Simple class to represent a user.
|
||||||
*/
|
*/
|
||||||
class MailboxHandler extends PFAHandler {
|
class MailboxHandler extends PFAHandler
|
||||||
|
{
|
||||||
protected $db_table = 'mailbox';
|
protected $db_table = 'mailbox';
|
||||||
protected $id_field = 'username';
|
protected $id_field = 'username';
|
||||||
protected $domain_field = 'domain';
|
protected $domain_field = 'domain';
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
abstract class PFAHandler {
|
abstract class PFAHandler
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* public variables
|
* public variables
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
/**
|
/**
|
||||||
* Turn on sanitisation of all data by default so it's not possible for XSS flaws to occur in PFA
|
* Turn on sanitisation of all data by default so it's not possible for XSS flaws to occur in PFA
|
||||||
*/
|
*/
|
||||||
class PFASmarty {
|
class PFASmarty
|
||||||
|
{
|
||||||
public static $instance = null;
|
public static $instance = null;
|
||||||
/**
|
/**
|
||||||
* @var Smarty
|
* @var Smarty
|
||||||
|
@ -29,7 +29,8 @@
|
|||||||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Shell {
|
class Shell
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* An instance of the ShellDispatcher object that loaded this script
|
* An instance of the ShellDispatcher object that loaded this script
|
||||||
*
|
*
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
class VacationHandler extends PFAHandler {
|
class VacationHandler extends PFAHandler
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
|
@ -348,7 +348,8 @@ for ($i = 0; $i < sizeof($tMailbox); $i++) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cNav_bar {
|
class cNav_bar
|
||||||
|
{
|
||||||
protected $count;
|
protected $count;
|
||||||
protected $title;
|
protected $title;
|
||||||
protected $limit;
|
protected $limit;
|
||||||
|
@ -66,7 +66,8 @@ if (!isset($_SESSION['authenticated'])) {
|
|||||||
echo $server->handle();
|
echo $server->handle();
|
||||||
|
|
||||||
|
|
||||||
class UserProxy {
|
class UserProxy
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $old_password
|
* @param string $old_password
|
||||||
@ -105,7 +106,8 @@ class UserProxy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class VacationProxy {
|
class VacationProxy
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* @return boolean true if the vacation is removed successfully. Else false.
|
* @return boolean true if the vacation is removed successfully. Else false.
|
||||||
*/
|
*/
|
||||||
@ -154,7 +156,8 @@ class VacationProxy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class AliasProxy {
|
class AliasProxy
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* @return array - array of aliases this user has. Array may be empty.
|
* @return array - array of aliases this user has. Array may be empty.
|
||||||
*/
|
*/
|
||||||
|
@ -33,7 +33,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
class PostfixAdmin {
|
class PostfixAdmin
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Version
|
* Version
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class Crypt {
|
class Crypt
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @access private
|
* @access private
|
||||||
|
@ -9,7 +9,8 @@ define('LM_HASH_SIZE', 16);
|
|||||||
define('NTLMSSP_HASH_SIZE', 16);
|
define('NTLMSSP_HASH_SIZE', 16);
|
||||||
|
|
||||||
|
|
||||||
class DovecotCrypt extends Crypt {
|
class DovecotCrypt extends Crypt
|
||||||
|
{
|
||||||
private $errormsg = [];
|
private $errormsg = [];
|
||||||
|
|
||||||
private $salt_chars = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
private $salt_chars = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class AdminHandlerTest extends \PHPUnit\Framework\TestCase {
|
class AdminHandlerTest extends \PHPUnit\Framework\TestCase
|
||||||
|
{
|
||||||
public function setUp() : void {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class AdminpasswordHandlerTest extends \PHPUnit\Framework\TestCase {
|
class AdminpasswordHandlerTest extends \PHPUnit\Framework\TestCase
|
||||||
|
{
|
||||||
public function testBasic() {
|
public function testBasic() {
|
||||||
$x = new AdminpasswordHandler();
|
$x = new AdminpasswordHandler();
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class AliasHandlerTest extends \PHPUnit\Framework\TestCase {
|
class AliasHandlerTest extends \PHPUnit\Framework\TestCase
|
||||||
|
{
|
||||||
protected function setUp(): void {
|
protected function setUp(): void {
|
||||||
// Fake being an admin.
|
// Fake being an admin.
|
||||||
$_SESSION = [
|
$_SESSION = [
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class AliasdomainHandlerTest extends \PHPUnit\Framework\TestCase {
|
class AliasdomainHandlerTest extends \PHPUnit\Framework\TestCase
|
||||||
|
{
|
||||||
public function testBasic() {
|
public function testBasic() {
|
||||||
$x = new AliasdomainHandler();
|
$x = new AliasdomainHandler();
|
||||||
|
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
/**
|
/**
|
||||||
* Obviously replies on working DNS service
|
* Obviously replies on working DNS service
|
||||||
*/
|
*/
|
||||||
class CheckDomainTest extends \PHPUnit\Framework\TestCase {
|
class CheckDomainTest extends \PHPUnit\Framework\TestCase
|
||||||
|
{
|
||||||
public function testBasic() {
|
public function testBasic() {
|
||||||
$this->assertEquals('', check_domain('example.com'));
|
$this->assertEquals('', check_domain('example.com'));
|
||||||
$this->assertEquals('', check_domain('google.com'));
|
$this->assertEquals('', check_domain('google.com'));
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
/**
|
/**
|
||||||
* Obviously relies on working DNS service etc.
|
* Obviously relies on working DNS service etc.
|
||||||
*/
|
*/
|
||||||
class CheckEmailTest extends \PHPUnit\Framework\TestCase {
|
class CheckEmailTest extends \PHPUnit\Framework\TestCase
|
||||||
|
{
|
||||||
public function testBasic() {
|
public function testBasic() {
|
||||||
$this->assertEquals('', check_email('test@example.com'));
|
$this->assertEquals('', check_email('test@example.com'));
|
||||||
$this->assertRegExp('/ not discoverable in DNS/', check_email('test@fishbeansblahblahblah' . uniqid() . '.com'));
|
$this->assertRegExp('/ not discoverable in DNS/', check_email('test@fishbeansblahblahblah' . uniqid() . '.com'));
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class CheckLanguageTest extends \PHPUnit\Framework\TestCase {
|
class CheckLanguageTest extends \PHPUnit\Framework\TestCase
|
||||||
|
{
|
||||||
public function testBasic() {
|
public function testBasic() {
|
||||||
global $supported_languages;
|
global $supported_languages;
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class CheckOwnerTest extends \PHPUnit\Framework\TestCase {
|
class CheckOwnerTest extends \PHPUnit\Framework\TestCase
|
||||||
|
{
|
||||||
public function testBasic() {
|
public function testBasic() {
|
||||||
$check = check_owner('random@example.com', 'test.com');
|
$check = check_owner('random@example.com', 'test.com');
|
||||||
$this->assertFalse($check, "there should be no entries in test.com as it's an invalid/non-existant domain");
|
$this->assertFalse($check, "there should be no entries in test.com as it's an invalid/non-existant domain");
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class ConfigTest extends \PHPUnit\Framework\TestCase {
|
class ConfigTest extends \PHPUnit\Framework\TestCase
|
||||||
|
{
|
||||||
public function setUp() : void {
|
public function setUp() : void {
|
||||||
$c = Config::getInstance();
|
$c = Config::getInstance();
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class CreatePageBrowserTest extends \PHPUnit\Framework\TestCase {
|
class CreatePageBrowserTest extends \PHPUnit\Framework\TestCase
|
||||||
|
{
|
||||||
public function tearDown() : void {
|
public function tearDown() : void {
|
||||||
$this->cleanup();
|
$this->cleanup();
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class DbBasicTest extends \PHPUnit\Framework\TestCase {
|
class DbBasicTest extends \PHPUnit\Framework\TestCase
|
||||||
|
{
|
||||||
private $test_domain;
|
private $test_domain;
|
||||||
|
|
||||||
public function setUp() : void {
|
public function setUp() : void {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class DomainHandlerTest extends \PHPUnit\Framework\TestCase {
|
class DomainHandlerTest extends \PHPUnit\Framework\TestCase
|
||||||
|
{
|
||||||
public function testBasic() {
|
public function testBasic() {
|
||||||
$x = new DomainHandler();
|
$x = new DomainHandler();
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class FetchmailHandlerTest extends \PHPUnit\Framework\TestCase {
|
class FetchmailHandlerTest extends \PHPUnit\Framework\TestCase
|
||||||
|
{
|
||||||
public function testBasic() {
|
public function testBasic() {
|
||||||
$x = new FetchmailHandler();
|
$x = new FetchmailHandler();
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class GeneratePasswordTest extends \PHPUnit\Framework\TestCase {
|
class GeneratePasswordTest extends \PHPUnit\Framework\TestCase
|
||||||
|
{
|
||||||
public function testBasic() {
|
public function testBasic() {
|
||||||
$one = generate_password();
|
$one = generate_password();
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class GetSiteUrlTest extends \PHPUnit\Framework\TestCase {
|
class GetSiteUrlTest extends \PHPUnit\Framework\TestCase
|
||||||
|
{
|
||||||
public function testControlViaConfig() {
|
public function testControlViaConfig() {
|
||||||
$server = [];
|
$server = [];
|
||||||
$orig = Config::getInstance()->getAll();
|
$orig = Config::getInstance()->getAll();
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class ListAdminsTest extends \PHPUnit\Framework\TestCase {
|
class ListAdminsTest extends \PHPUnit\Framework\TestCase
|
||||||
|
{
|
||||||
public function testBasic() {
|
public function testBasic() {
|
||||||
$list= list_admins();
|
$list= list_admins();
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class ListDomainsForAdminTest extends \PHPUnit\Framework\TestCase {
|
class ListDomainsForAdminTest extends \PHPUnit\Framework\TestCase
|
||||||
|
{
|
||||||
public function testBasic() {
|
public function testBasic() {
|
||||||
$this->assertEquals([], list_domains_for_admin('test@test.com'));
|
$this->assertEquals([], list_domains_for_admin('test@test.com'));
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class ListDomainsTest extends \PHPUnit\Framework\TestCase {
|
class ListDomainsTest extends \PHPUnit\Framework\TestCase
|
||||||
|
{
|
||||||
public function testBasic() {
|
public function testBasic() {
|
||||||
$domains = list_domains();
|
$domains = list_domains();
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class LoginTest extends \PHPUnit\Framework\TestCase {
|
class LoginTest extends \PHPUnit\Framework\TestCase
|
||||||
|
{
|
||||||
public function setUp(): void {
|
public function setUp(): void {
|
||||||
global $CONF;
|
global $CONF;
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class MailboxHandlerTest extends \PHPUnit\Framework\TestCase {
|
class MailboxHandlerTest extends \PHPUnit\Framework\TestCase
|
||||||
|
{
|
||||||
public function tearDown() : void {
|
public function tearDown() : void {
|
||||||
db_query('DELETE FROM mailbox');
|
db_query('DELETE FROM mailbox');
|
||||||
db_query('DELETE FROM alias');
|
db_query('DELETE FROM alias');
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class PaCryptTest extends \PHPUnit\Framework\TestCase {
|
class PaCryptTest extends \PHPUnit\Framework\TestCase
|
||||||
|
{
|
||||||
public function testMd5Crypt() {
|
public function testMd5Crypt() {
|
||||||
$hash = _pacrypt_md5crypt('test', '');
|
$hash = _pacrypt_md5crypt('test', '');
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class PasswordValidationCallableTEst extends \PHPUnit\Framework\TestCase {
|
class PasswordValidationCallableTEst extends \PHPUnit\Framework\TestCase
|
||||||
|
{
|
||||||
public function setUp(): void {
|
public function setUp(): void {
|
||||||
$c = Config::getInstance();
|
$c = Config::getInstance();
|
||||||
|
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
|
|
||||||
require_once('RemoteTest.php');
|
require_once('RemoteTest.php');
|
||||||
|
|
||||||
class RemoteAliasTest extends RemoteTest {
|
class RemoteAliasTest extends RemoteTest
|
||||||
|
{
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
global $CONF;
|
global $CONF;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
abstract class RemoteTest extends \PHPUnit\Framework\TestCase {
|
abstract class RemoteTest extends \PHPUnit\Framework\TestCase
|
||||||
|
{
|
||||||
protected $server_url = 'http://change.me/to/work'; // http://orange/david/postfixadmin/xmlrpc.php';
|
protected $server_url = 'http://change.me/to/work'; // http://orange/david/postfixadmin/xmlrpc.php';
|
||||||
protected $username = 'user@example.com';
|
protected $username = 'user@example.com';
|
||||||
protected $password = 'password1';
|
protected $password = 'password1';
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
|
|
||||||
require_once('RemoteTest.php');
|
require_once('RemoteTest.php');
|
||||||
|
|
||||||
class RemoteUserTest extends RemoteTest {
|
class RemoteUserTest extends RemoteTest
|
||||||
|
{
|
||||||
public function testChangePassword() {
|
public function testChangePassword() {
|
||||||
$this->assertTrue($this->user->login($this->username, $this->password));
|
$this->assertTrue($this->user->login($this->username, $this->password));
|
||||||
$this->assertTrue($this->user->changePassword($this->password, 'foobar'));
|
$this->assertTrue($this->user->changePassword($this->password, 'foobar'));
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
|
|
||||||
require_once('RemoteTest.php');
|
require_once('RemoteTest.php');
|
||||||
|
|
||||||
class RemoteVacationTest extends RemoteTest {
|
class RemoteVacationTest extends RemoteTest
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class RemoveFromArrayTest extends \PHPUnit\Framework\TestCase {
|
class RemoveFromArrayTest extends \PHPUnit\Framework\TestCase
|
||||||
|
{
|
||||||
public function testBasic() {
|
public function testBasic() {
|
||||||
$list = array('a','b','c','d');
|
$list = array('a','b','c','d');
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class ValidatePasswordTest extends \PHPUnit\Framework\TestCase {
|
class ValidatePasswordTest extends \PHPUnit\Framework\TestCase
|
||||||
|
{
|
||||||
public function testBasic() {
|
public function testBasic() {
|
||||||
$config = Config::getInstance();
|
$config = Config::getInstance();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user