Duplicate src/Util/Exception/NicknameTooLongException.php history in src/Util/Exception/NicknameTooShortException.php history.

This commit is contained in:
Hugo Sales 2021-04-10 20:43:30 +00:00
parent dc2a453e94
commit 5afd2c9843
Signed by untrusted user: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
2 changed files with 26 additions and 5 deletions

View File

@ -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]);
}
}

View File

@ -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 = '';