« Previous | Next » 

Revision 4a6dc776

ID4a6dc77661ad7126cc8a6c312bd6ad053498b64d

Added by Bastian Waidelich over 10 years ago

[+BUGFIX] replace uniqid() calls in Unit Tests

Currently we're using uniqid() in order to create random (class) names
in the FLOW3 unit tests. Unfortunately uniqid() is not so unique - at
least not on Windows:

"[...] since microtime() only works on systems that have gettimeofday()
present, which Windows natively DOES NOT, uniqid() might yield just the
single-second-resolution UNIX timestamp in a Windows environment."
(from http://www.php.net/uniqid)

This leads to fatal errors "Cannot redeclare class [XYZ]" when
executing the tests on Windows.
This is solved by specifying a random seed using mt_rand().

Change-Id: I389712bcd51959944db19fcbd11c2848ccfa6765
Related: #11621

  • added
  • modified
  • copied
  • renamed
  • deleted