浏览代码

MethodNotImplementedException -> MethodArgumentValueNotImplementedException

Francesc Rosàs 13 年之前
父节点
当前提交
4938080422

+ 2 - 2
src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php

@@ -416,12 +416,12 @@ class StubIntlDateFormatter
      *
      * @see    http://www.php.net/manual/en/intldateformatter.setlenient.php
      *
-     * @throws MethodNotImplementedException When $lenient is true
+     * @throws MethodArgumentValueNotImplementedException When $lenient is true
      */
     public function setLenient($lenient)
     {
         if ($lenient) {
-            throw new MethodNotImplementedException(__METHOD__);
+            throw new MethodArgumentValueNotImplementedException(__METHOD__, 'lenient', $lenient, 'Only the strict parser is supported');
         }
     }
 

+ 1 - 1
tests/Symfony/Tests/Component/Locale/Stub/StubIntlDateFormatterTest.php

@@ -908,7 +908,7 @@ class StubIntlDateFormatterTest extends LocaleTestCase
     }
 
     /**
-     * @expectedException Symfony\Component\Locale\Exception\MethodNotImplementedException
+     * @expectedException Symfony\Component\Locale\Exception\MethodArgumentValueNotImplementedException
      */
     public function testSetLenient()
     {