merged branch beberlei/GH-4491 (PR #4493)
Commits -------4938080
MethodNotImplementedException -> MethodArgumentValueNotImplementedException789fc14
Accept calling setLenient(false) Discussion ---------- GH-4491 - Move patch from master to 2.0 A patch in PR-4469 fixed an issue with setLenient() and not having intl. This was only merged into master, although the original issue was created in the 2.0 branch. This PR cherry-picked the patches against 2.0 again. --------------------------------------------------------------------------- by travisbot at 2012-06-06T15:29:19Z This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1527145) (merged49380804
into9a5e6c90
). --------------------------------------------------------------------------- by kbond at 2012-06-06T17:42:40Z fixes #4491
This commit is contained in:
commit
15b5aa4f7c
@ -416,11 +416,13 @@ class StubIntlDateFormatter
|
|||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/intldateformatter.setlenient.php
|
* @see http://www.php.net/manual/en/intldateformatter.setlenient.php
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodArgumentValueNotImplementedException When $lenient is true
|
||||||
*/
|
*/
|
||||||
public function setLenient($lenient)
|
public function setLenient($lenient)
|
||||||
{
|
{
|
||||||
throw new MethodNotImplementedException(__METHOD__);
|
if ($lenient) {
|
||||||
|
throw new MethodArgumentValueNotImplementedException(__METHOD__, 'lenient', $lenient, 'Only the strict parser is supported');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -908,7 +908,7 @@ class StubIntlDateFormatterTest extends LocaleTestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException Symfony\Component\Locale\Exception\MethodNotImplementedException
|
* @expectedException Symfony\Component\Locale\Exception\MethodArgumentValueNotImplementedException
|
||||||
*/
|
*/
|
||||||
public function testSetLenient()
|
public function testSetLenient()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user