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
71e2dcc6
Commit
71e2dcc6
authored
Oct 17, 2013
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better MessageFormatter tests
parent
bf7a0842
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
MessageFormatterTest.php
tests/unit/framework/i18n/MessageFormatterTest.php
+9
-2
No files found.
tests/unit/framework/i18n/MessageFormatterTest.php
View file @
71e2dcc6
...
...
@@ -142,11 +142,18 @@ _MSG_
}
/**
* when instantiating a MessageFormatter with invalid pattern it should be null
* When instantiating a MessageFormatter with invalid pattern it should be null with default settings.
* It will be IntlException if intl.use_exceptions=1 and PHP 5.5 or newer or an error if intl.error_level is not 0.
*/
public
function
testNullConstructor
()
{
$this
->
assertNull
(
new
MessageFormatter
(
'en_US'
,
''
));
if
(
ini_get
(
'intl.use_exceptions'
))
{
$this
->
setExpectedException
(
'IntlException'
);
}
if
(
!
ini_get
(
'intl.error_level'
)
||
ini_get
(
'intl.use_exceptions'
))
{
$this
->
assertNull
(
new
MessageFormatter
(
'en_US'
,
''
));
}
}
public
function
testNoParams
()
...
...
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