forked from GNUsocial/gnu-social
Duplicate src/Util/Exception/NicknameTooLongException.php history in src/Util/Exception/NicknameTooShortException.php history.
This commit is contained in:
parent
cafd9a39a0
commit
aa58c3520c
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
// {{{ License
|
||||
|
||||
// This file is part of GNU social - https://www.gnu.org/software/social
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
@ -15,21 +16,39 @@
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// }}}
|
||||
|
||||
/**
|
||||
* Functional utilities
|
||||
* Nickname too long exception
|
||||
*
|
||||
* @category Exception
|
||||
* @package GNUsocial
|
||||
* @category Util
|
||||
*
|
||||
* @author Zach Copley <zach@status.net>
|
||||
* @copyright 2010 StatusNet Inc.
|
||||
* @author Brion Vibber <brion@pobox.com>
|
||||
* @author Mikael Nordfeldth <mmn@hethane.se>
|
||||
* @author Nym Coy <nymcoy@gmail.com>
|
||||
* @copyright 2009-2014 Free Software Foundation, Inc http://www.fsf.org
|
||||
* @auuthor Daniel Supernault <danielsupernault@gmail.com>
|
||||
* @auuthor Diogo Cordeiro <diogo@fc.up.pt>
|
||||
*
|
||||
* @author Hugo Sales <hugo@hsal.es>
|
||||
* @copyright 2020-2021 Free Software Foundation, Inc http://www.fsf.org
|
||||
* @copyright 2018-2021 Free Software Foundation, Inc http://www.fsf.org
|
||||
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
|
||||
*/
|
||||
|
||||
namespace App\Util;
|
||||
namespace App\Util\Exception;
|
||||
|
||||
abstract class Functional
|
||||
use function App\Core\I18n\_m;
|
||||
use App\Util\Nickname;
|
||||
|
||||
class NicknameTooLongException extends NicknameInvalidException
|
||||
{
|
||||
protected function defaultMessage(): string
|
||||
{
|
||||
// TRANS: Validation error in form for registration, profile and group settings, etc.
|
||||
return _m('Nickname cannot be more than # character long.', ['count' => Nickname::MAX_LEN]);
|
||||
}
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
// {{{ License
|
||||
// This file is part of GNU social - https://www.gnu.org/software/social
|
||||
//
|
||||
@ -36,6 +37,7 @@ class ActorArrayTransformerTest extends WebTestCase
|
||||
|
||||
static::assertSame('user1 user2 user3', (new ActorArrayTransformer)->transform($testArr));
|
||||
}
|
||||
|
||||
public function testReverseTransform()
|
||||
{
|
||||
$testString = '';
|
Loading…
Reference in New Issue
Block a user