ZF-2613: Fatal error running unit tests: Class 'DateTimeZone' not found

Issue Type: Unit Tests: Problem Created: 2008-02-11T10:10:36.000+0000 Last Updated: 2008-02-26T12:56:01.000+0000 Status: Resolved Fix version(s): - 1.0.4 (26/Feb/08)

Reporter: Darby Felton (darby) Assignee: Thomas Weidner (thomas) Tags: - Zend_Date

Related issues: Attachments:


When running "phpunit --verbose AllTests" (from trunk/tests), I get the following fatal error:

<pre class="literal">
Fatal error: Class 'DateTimeZone' not found in c:\Documents and Settings\dfelton\My Documents\SVN Remote\Zend Framework\
trunk\library\Zend\Date.php on line 1336

Call Stack:
    0.0041   1. {main}() c:\wamp\php\PEAR\PHPUnit\TextUI\Command.php:0
    1.8150   2. PHPUnit_TextUI_Command::main() c:\wamp\php\PEAR\PHPUnit\TextUI\Command.php:528
   28.2982   3. PHPUnit_TextUI_TestRunner->doRun() c:\wamp\php\PEAR\PHPUnit\TextUI\Command.php:112
   28.2987   4. PHPUnit_Framework_TestSuite->run() C:\wamp\php\PEAR\PHPUnit\TextUI\TestRunner.php:295
   28.4082   5. PHPUnit_Framework_TestSuite->run() C:\wamp\php\PEAR\PHPUnit\Framework\TestSuite.php:647
   96.3383   6. PHPUnit_Framework_TestSuite->run() C:\wamp\php\PEAR\PHPUnit\Framework\TestSuite.php:647
   96.3386   7. PHPUnit_Framework_TestSuite->runTest() C:\wamp\php\PEAR\PHPUnit\Framework\TestSuite.php:664
   96.3386   8. PHPUnit_Framework_TestCase->run() C:\wamp\php\PEAR\PHPUnit\Framework\TestSuite.php:684
   96.3386   9. PHPUnit_Framework_TestResult->run() C:\wamp\php\PEAR\PHPUnit\Framework\TestCase.php:376
   96.3389  10. PHPUnit_Framework_TestCase->runBare() C:\wamp\php\PEAR\PHPUnit\Framework\TestResult.php:611
   96.4040  11. PHPUnit_Framework_TestCase->runTest() C:\wamp\php\PEAR\PHPUnit\Framework\TestCase.php:401
   96.4041  12. ReflectionMethod->invoke() C:\wamp\php\PEAR\PHPUnit\Framework\TestCase.php:476
   96.4041  13. Zend_DateTest->testCreation() c:\Documents and Settings\dfelton\My Documents\SVN Remote\Zend Framework\t
   96.4075  14. Zend_Date->__construct() c:\Documents and Settings\dfelton\My Documents\SVN Remote\Zend Framework\trunk\
   96.4201  15. Zend_Date->getTimezoneFromString() c:\Documents and Settings\dfelton\My Documents\SVN Remote\Zend Framew


Posted by Darby Felton (darby) on 2008-02-11T10:11:48.000+0000

I forgot to mention that the results were from WinXP, PHP 5.1.4, PHPUnit 3.2.13 under the default test configuration (TestConfiguration.php.dist).

Posted by Thomas Weidner (thomas) on 2008-02-11T12:34:44.000+0000

Interesting... because DateTimeZone is available since 5.1.0 within PHP and was build within the windows version since then...

Posted by Thomas Weidner (thomas) on 2008-02-11T14:03:33.000+0000

Fixed with SVN-7920. Reworked internal timezone detection handling.

No more use of the simple DateTime classes. Has to be reworked as soon as the minimum requirements are raised.

Tested under XP with 5.1.4 and 5.2.5 with standard installation.

Have you found an issue?

See the Overview section for more details.


© 2006-2017 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.