Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: fix method name ValidationErrors in View\Plugins #8758

Merged
merged 2 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion system/View/Plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public static function lang(array $params = []): string
*
* @param array{field?: string} $params
*/
public static function ValidationErrors(array $params = []): string
public static function validationErrors(array $params = []): string
{
$validator = service('validation');
if ($params === []) {
Expand Down
8 changes: 8 additions & 0 deletions tests/system/View/ParserPluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ public function testLang(): void
$template = '{+ lang Number.terabyteAbbr +}';

$this->assertSame('TB', $this->parser->renderString($template));

$template = '{+ lang Time.years 2024 +}';

$this->assertSame('2,024 years', $this->parser->renderString($template));
}

public function testValidationErrors(): void
Expand Down Expand Up @@ -122,6 +126,10 @@ public function testSiteURL(): void
$template = '{+ siteURL +}';

$this->assertSame('http://example.com/index.php', $this->parser->renderString($template));

$template = '{+ siteURL login +}';

$this->assertSame('http://example.com/index.php/login', $this->parser->renderString($template));
}

public function testValidationErrorsList(): void
Expand Down
Loading