瀏覽代碼

[ZF-11837] Second update to unit test. Now works both when run independently and as part of Locale suite.

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@24521 44c647ce-9c0f-0410-b52a-842ac1e357ba
adamlundrigan 14 年之前
父節點
當前提交
8ec4d60320
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      tests/Zend/Locale/FormatTest.php

+ 3 - 1
tests/Zend/Locale/FormatTest.php

@@ -1101,7 +1101,9 @@ class Zend_Locale_FormatTest extends PHPUnit_Framework_TestCase
     {
     {
         try {
         try {
             setlocale(LC_ALL, 'en_US'); // test setup
             setlocale(LC_ALL, 'en_US'); // test setup
-            $this->assertTrue(Zend_Locale_Format::checkDateFormat('2011/10/21', array()));
+            Zend_Locale_Format::setOptions(array('date_format' => 'yyyy-MM-dd'));
+            
+            $this->assertTrue(Zend_Locale_Format::checkDateFormat('2011-10-21', array()));
         } catch ( PHPUnit_Framework_Error_Notice $ex ) {
         } catch ( PHPUnit_Framework_Error_Notice $ex ) {
             $this->fail('Zend_Locale_Format::checkDateFormat emitted unexpected E_NOTICE');
             $this->fail('Zend_Locale_Format::checkDateFormat emitted unexpected E_NOTICE');
         }
         }