You've already forked postfixadmin
mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2025-08-07 17:42:53 +03:00
composer format time
This commit is contained in:
@@ -401,7 +401,7 @@ class AliasHandler extends PFAHandler {
|
|||||||
$errors[] = "$singlegoto: $email_check";
|
$errors[] = "$singlegoto: $email_check";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($this->called_by != "MailboxHandler" && $this->id == $singlegoto) {
|
if ($this->called_by != "MailboxHandler" && $this->id == $singlegoto) {
|
||||||
// The MailboxHandler needs to create an alias that points to itself (for the mailbox)
|
// The MailboxHandler needs to create an alias that points to itself (for the mailbox)
|
||||||
// Otherwise, disallow such aliases as they cause severe trouble in the mail system
|
// Otherwise, disallow such aliases as they cause severe trouble in the mail system
|
||||||
$errors[] = "$singlegoto: " . Config::Lang('alias_points_to_itself');
|
$errors[] = "$singlegoto: " . Config::Lang('alias_points_to_itself');
|
||||||
|
@@ -12,8 +12,6 @@ class AdminHandlerTest extends \PHPUnit\Framework\TestCase {
|
|||||||
|
|
||||||
$this->assertEmpty($results);
|
$this->assertEmpty($results);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */
|
/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */
|
||||||
|
@@ -1,9 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class AliasHandlerTest extends \PHPUnit\Framework\TestCase
|
class AliasHandlerTest extends \PHPUnit\Framework\TestCase {
|
||||||
{
|
public function testBasic() {
|
||||||
public function testBasic()
|
|
||||||
{
|
|
||||||
$x = new AliasHandler();
|
$x = new AliasHandler();
|
||||||
$list = $x->getList("");
|
$list = $x->getList("");
|
||||||
$this->assertTrue($list);
|
$this->assertTrue($list);
|
||||||
@@ -11,8 +9,7 @@ class AliasHandlerTest extends \PHPUnit\Framework\TestCase
|
|||||||
$this->assertEmpty($results);
|
$this->assertEmpty($results);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown(): void
|
public function tearDown(): void {
|
||||||
{
|
|
||||||
$_SESSION = [];
|
$_SESSION = [];
|
||||||
db_query('DELETE FROM alias');
|
db_query('DELETE FROM alias');
|
||||||
db_query('DELETE FROM domain_admins');
|
db_query('DELETE FROM domain_admins');
|
||||||
@@ -21,8 +18,7 @@ class AliasHandlerTest extends \PHPUnit\Framework\TestCase
|
|||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testCannotAddAliasUntilDomainIsThere()
|
public function testCannotAddAliasUntilDomainIsThere() {
|
||||||
{
|
|
||||||
|
|
||||||
// Fake us being an admin.
|
// Fake us being an admin.
|
||||||
|
|
||||||
@@ -56,8 +52,7 @@ class AliasHandlerTest extends \PHPUnit\Framework\TestCase
|
|||||||
/**
|
/**
|
||||||
* @see https://github.com/postfixadmin/postfixadmin/pull/375 and https://github.com/postfixadmin/postfixadmin/issues/358
|
* @see https://github.com/postfixadmin/postfixadmin/pull/375 and https://github.com/postfixadmin/postfixadmin/issues/358
|
||||||
*/
|
*/
|
||||||
public function testCannotAddAliasThatPointsToItself()
|
public function testCannotAddAliasThatPointsToItself() {
|
||||||
{
|
|
||||||
// Fake being an admin.
|
// Fake being an admin.
|
||||||
$_SESSION = [
|
$_SESSION = [
|
||||||
'sessid' => [
|
'sessid' => [
|
||||||
@@ -140,8 +135,7 @@ class AliasHandlerTest extends \PHPUnit\Framework\TestCase
|
|||||||
], $x->errormsg);
|
], $x->errormsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testAddingDataEtc()
|
public function testAddingDataEtc() {
|
||||||
{
|
|
||||||
// Fake being an admin.
|
// Fake being an admin.
|
||||||
$_SESSION = [
|
$_SESSION = [
|
||||||
'sessid' => [
|
'sessid' => [
|
||||||
|
Reference in New Issue
Block a user