Commit Graph

75 Commits

Author SHA1 Message Date
Ben Ramsey cd2d09c356 Introduce Converter namespace and move Number and Time classes into it 2014-11-08 14:43:09 -05:00
Thibaud Fabre 61ba697853 Fix decode output for v5 (incorrect hash algo name) 2014-11-08 16:28:19 +01:00
Thibaud Fabre 04c64d6f45 Refactor duplicate code 2014-11-08 15:41:53 +01:00
Thibaud Fabre c07988fe31 Refactor codecs to remove duplication 2014-11-08 15:00:58 +01:00
Thibaud Fabre 84123b2060 Remove all env related logic from factory
Defers all environment related decisions to factory initialization
All behavior is customizable through DI, but all deps are initialized to proper default instances
Removes static factory configuration
2014-11-08 12:41:40 +01:00
Thibaud Fabre f97c9e08f9 Rename degraded feature classes with more consistent names 2014-11-06 10:42:02 +01:00
Thibaud Fabre cd3e58b1f5 Refactor fromInteger method to use factory 2014-10-30 16:07:48 +01:00
Thibaud Fabre 053a25f335 Remove 5.3 build & debug info 2014-10-30 15:16:59 +01:00
Thibaud Fabre fead6f3223 Refactor in the spirit of #1 & #34 2014-10-30 15:16:59 +01:00
Thibaud Fabre 723ef345bf Refactor factory functions
Remove $littleEndian parameter
Add fromGuidString/Bytes factory methods for GUIDs
No longer possible to output GUIDs as UUIDs and vice-versa
Pass tests
2014-10-30 15:15:16 +01:00
Thibaud Fabre 13b3bf7ed9 Refactor from/toString methods to codecs 2014-10-30 15:15:16 +01:00
Thibaud Fabre 65916f2928 Set default timezone in PHPUnit bootstrap to pass HHVM tests 2014-10-30 15:13:45 +01:00
Thibaud Fabre b28029fbc7 Add support for MS GUIDs 2014-10-30 15:13:45 +01:00
Ben Ramsey 0e7e2b8043 Merge branch 'add-from-integer' of github.com:terrycorley/uuid into terrycorley-add-from-integer 2014-10-29 22:52:33 -05:00
Ben Ramsey e66eb997a1 Set timezone for tests 2014-10-24 08:55:20 -05:00
Terry Corley 7fa0c32f8b Adding static fromInteger method to create UUIDs from string integer or BigNumber, along with tests. 2014-07-14 18:44:11 -05:00
Ben Ramsey c43be02bd9 Upgraded to PSR-4 autoloading 2014-02-21 18:35:01 -06:00
Ben Ramsey f02da50e50 Ensure that tests run even in cases when dev packages are not present 2014-02-21 18:01:35 -06:00
Ben Ramsey cd315b29ab Skip console tests if symfony/console and moontoast/math are not present 2014-02-21 14:53:53 -06:00
Ben Ramsey 5b1c44a5ce Switch tests to use ISO format date, since days of week are hard. 2014-02-21 13:53:23 -06:00
Ben Ramsey 2ea4c90bd7 Support symfony/console for 2.3 (LTS version); fixes #21 2014-02-19 20:20:49 -06:00
Ben Ramsey 4fa3a7abfd Moving moontoast/math and symfony/console to require-dev; fixes #20 2014-02-19 19:41:12 -06:00
Ben Ramsey ef48173004 Full test coverage for the console decode command 2014-01-17 16:39:09 -06:00
Ben Ramsey a7e43e546a Full test coverage for getHex() and getInteger() 2014-01-17 16:38:44 -06:00
Ben Ramsey 3ca5ab77bf Move adding of command to the bin script 2013-12-28 16:31:52 -06:00
Ben Ramsey 6430a37adc Refactor to move the network configuration capture to a separate method 2013-12-27 08:53:45 -06:00
Ben Ramsey 7bebd01e31 Add uuid console application and tests for generating UUIDs from CLI 2013-12-27 08:42:55 -06:00
Daniel Freudenberger d4d5b45ab8 fixes #16
fix unit tests to be compatible with doctrine/dbal >= 2.4.0
2013-09-18 00:33:03 +02:00
Ben Ramsey 4d746373fa Full code coverage for generateBytes() 2013-09-15 17:17:33 -05:00
Ben Ramsey 75031718ab Enhance tests by using an array of known values from the Python UUID tests 2013-07-26 17:38:16 -05:00
Ben Ramsey 1f14542622 Enhance the massive time test with more usec values and compare times 2013-07-26 17:36:41 -05:00
Ben Ramsey 22d0b44844 Enhance tests for version-3 and version-5 UUIDs with more known values 2013-07-26 17:35:49 -05:00
Ben Ramsey 77c9c154f6 Allow a 128-bit integer formatted as a hex string in Uuid::fromString() 2013-07-26 17:34:27 -05:00
Alexander ebe97d4c27 Add Uuid::fromBytes() to (re-)create a Uuid from a byte string 2013-07-16 13:44:28 +02:00
Ben Ramsey 4333707ecd Added a test for requiresSQLCommentHint() 2013-07-04 10:51:23 -05:00
Ben Ramsey 41f9f27337 Rather than skipping these tests, just return for a clean test run 2013-07-03 18:00:49 -05:00
Ben Ramsey e44a6ae90f Ensure uppercase digits in the node are converted to lowercase 2013-07-03 17:59:25 -05:00
Ben Ramsey 9d175d1d79 Fixed NIL bug in isValid() method, reported by @ocubom in PR #11 2013-04-29 15:38:09 -05:00
Eric Thelin 40a13a18c6 create isValid method call to check is a UUID matches the standards including tests 2013-04-15 17:47:08 -05:00
Ben Ramsey 689af97cd9 Throw exception from getTimestampHex() if not a version 1 UUID 2013-01-19 13:25:32 -06:00
Ben Ramsey 8f63d671a7 Replace BadMethodCallException with UnsatisfiedDependencyException 2013-01-19 12:48:05 -06:00
Ben Ramsey ad3bde8b24 Moved UnsupportedOperationException to the Exception subnamespace 2013-01-19 12:09:04 -06:00
Ben Ramsey 52e080bc52 Fixing tests to run on 32-bit systems 2013-01-06 13:13:15 -06:00
Ben Ramsey 3c3abba795 Copied UuidTest from 1.1.2 tag and placed here for BC tests 2013-01-06 11:10:13 -06:00
Ben Ramsey f76f65e83c Cleaning up tests; removed TestCase class and moved all into UuidTest 2013-01-05 03:14:23 -06:00
Ben Ramsey eb83d9bcf9 BC-BREAK: Changing output of most/least sig bits methods 2013-01-05 03:12:59 -06:00
Ben Ramsey 9104026c14 Support UUID timestamp on 32-bit systems 2013-01-05 02:56:17 -06:00
Ben Ramsey a3eb795b82 Switch system node parameter to be a string hexadecimal value 2013-01-04 22:56:02 -06:00
Ben Ramsey 61cd298122 Throwing exceptions for certain methods on 32-bit systems 2013-01-04 22:37:41 -06:00
Ben Ramsey ed8ec33eb1 Adding hasBigNumber() and is64BitSystem() helper methods 2013-01-04 21:58:47 -06:00