Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
dde695cd
Commit
dde695cd
authored
Jun 24, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added GridView message check to FallbackMessageFormatterTest
parent
06de50da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
FallbackMessageFormatterTest.php
tests/unit/framework/i18n/FallbackMessageFormatterTest.php
+8
-0
No files found.
tests/unit/framework/i18n/FallbackMessageFormatterTest.php
View file @
dde695cd
...
@@ -160,6 +160,14 @@ _MSG_
...
@@ -160,6 +160,14 @@ _MSG_
$result
=
$formatter
->
fallbackFormat
(
$pattern
,
[],
'en-US'
);
$result
=
$formatter
->
fallbackFormat
(
$pattern
,
[],
'en-US'
);
$this
->
assertEquals
(
$pattern
,
$result
,
$formatter
->
getErrorMessage
());
$this
->
assertEquals
(
$pattern
,
$result
,
$formatter
->
getErrorMessage
());
}
}
public
function
testGridViewMessage
()
{
$pattern
=
'Showing <b>{begin, number}-{end, number}</b> of <b>{totalCount, number}</b> {totalCount, plural, one{item} other{items}}.'
;
$formatter
=
new
FallbackMessageFormatter
();
$result
=
$formatter
->
fallbackFormat
(
$pattern
,
[
'begin'
=>
1
,
'end'
=>
5
,
'totalCount'
=>
10
],
'en-US'
);
$this
->
assertEquals
(
'Showing <b>1-5</b> of <b>10</b> items.'
,
$result
);
}
}
}
class
FallbackMessageFormatter
extends
MessageFormatter
class
FallbackMessageFormatter
extends
MessageFormatter
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment