Skip to content

Commit 4d5e012

Browse files
authored
Merge pull request #8758 from kenjis/fix-View-Plugins-ValidationErrors
refactor: fix method name `ValidationErrors` in View\Plugins
2 parents 22e3450 + 7f86e00 commit 4d5e012

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

system/View/Plugins.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public static function lang(array $params = []): string
8585
*
8686
* @param array{field?: string} $params
8787
*/
88-
public static function ValidationErrors(array $params = []): string
88+
public static function validationErrors(array $params = []): string
8989
{
9090
$validator = service('validation');
9191
if ($params === []) {

tests/system/View/ParserPluginTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ public function testLang(): void
9393
$template = '{+ lang Number.terabyteAbbr +}';
9494

9595
$this->assertSame('TB', $this->parser->renderString($template));
96+
97+
$template = '{+ lang Time.years 2024 +}';
98+
99+
$this->assertSame('2,024 years', $this->parser->renderString($template));
96100
}
97101

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

124128
$this->assertSame('http://example.com/index.php', $this->parser->renderString($template));
129+
130+
$template = '{+ siteURL login +}';
131+
132+
$this->assertSame('http://example.com/index.php/login', $this->parser->renderString($template));
125133
}
126134

127135
public function testValidationErrorsList(): void

0 commit comments

Comments
 (0)