Ben Ramsey
5c08654f98
Move exception expectation
2021-09-24 11:55:30 -05:00
Ben Ramsey
90031b396c
Fix coding standards and coverage issues
2021-09-23 14:07:00 -05:00
Ben Ramsey
c9ed6dd82f
Prepare tests for running on PHP 8
2021-09-23 13:58:48 -05:00
Ben Ramsey
e9012383f8
Fix rounding bug in timestamp for v1 UUIDs
2020-02-20 22:11:28 -06:00
Ben Ramsey
231027100a
Increase microseconds in another test to ensure enough time passes
2019-12-06 14:54:08 -08:00
Ben Ramsey
9e48187656
Add slightly more sleep to ensure timestamps don't collide
2019-12-04 17:09:13 -08:00
Ben Ramsey
64ba9a2767
Clean up code according to PhpStorm inspections report
2019-11-30 13:14:52 -08:00
Lee Boynton
2804748423
Don't allow UUIDs to have trailing newline
2018-05-02 18:54:33 +01:00
Ben Peachey
dbb9a8b6d1
Changes all usage in Tests of getMock with getMockBuilder.
2017-10-17 12:46:25 +02:00
Davis Peixoto
46071e69a1
173 - Expose UUID versions - Alternative 1
...
https://github.com/ramsey/uuid/issues/173
Creating constants on Uuid object, so they can be used as
- Uuid::UUID_TYPE_TIME
- Uuid::UUID_TYPE_RANDOM
# Alternative 1
Create constants on Uuid class
Signed-off-by: Davis Peixoto <davis.peixoto@gmail.com >
2017-08-03 21:12:10 -03:00
Davis Peixoto
0915c7bdc2
173 - Expose UUID versions - Alternative 1
...
https://github.com/ramsey/uuid/issues/173
Creating constants on Uuid object, so they can be used as
- UUID::UUID_TYPE_TIME
- UUID::UUID_TYPE_RANDOM
# Alternative 1
Create constants on Uuid class
Signed-off-by: Davis Peixoto <davis.peixoto@gmail.com >
2017-08-02 08:55:26 -03:00
Massimiliano Arione
a2647abc14
add a specific exception for invalid UUID string
2017-03-11 10:52:53 +01:00
Ben Ramsey
2f7d4ff00f
Add tests for uuid3() and uuid4() to test behavior for empty strings
2017-02-02 15:30:40 -06:00
Jessica Mauerhan
65cc76f721
remove extra ; causing PHPCBF to fail
2016-10-02 10:27:23 -04:00
Jessica Mauerhan
58dd3dd249
Add failing test cases for case issue (GH Issue #131 )
2016-09-30 15:55:04 -04:00
Andreas Möller
7ff6fff06d
Fix: Move tests one up
2016-09-15 08:31:27 +02:00
Ben Ramsey
f5e96b6af7
Restructure tests
2015-10-03 10:59:44 -05:00
Ben Ramsey
e99347f70d
Merge pull request #77 from aztech-forks/master
...
Improve GUID support
2015-08-28 09:36:45 -05:00
Aztech
4c35be716a
Remove message assertion -- cannot pass in both 32 and 64 bits envs
2015-08-14 23:26:15 +02:00
Aztech
8c699ecfec
Fix exception message assertion in tests
2015-08-14 23:10:23 +02:00
Aztech
958468d95b
Detect host endianness when building codec
2015-08-14 22:24:16 +02:00
Aztech
d3535feb50
Use host dependant endianness in GUID string codec
2015-08-14 21:57:59 +02:00
Aztech
8974c76bf6
Refactor TimeGeneratorInterface
...
- Remove UuidFactory from signature
- Remove setters on UuidFactory to prevent inconsistencies (a new feature set and factory should be used instead)
- Update tests to reflect those changes
2015-07-27 11:14:20 -05:00
Ben Ramsey
9092d16213
Have UuidInterface extend from JsonSerializable and cover it with a test
2015-07-16 11:36:05 -05:00
Ben Ramsey
b3ef99a2e9
Move RandomGeneratorInterface and RandomGeneratorFactory to Generator NS
2015-07-16 09:54:04 -05:00
Ben Ramsey
40636ca922
Fix "Undefined variable: usec" error in test
2015-06-21 19:38:38 -05:00
Ben Ramsey
d67c3490a8
Change namespace to "Ramsey"; closes #48
2015-04-25 12:11:37 -05:00
Thibaud Fabre
cc23f64d58
Add COMB generator for use with UUID4
2015-02-07 13:14:58 +01:00
Ben Ramsey
958643e7b6
Introduce Provider namespace and move Node and Time classes into it
2014-11-08 16:16:44 -05:00
Ben Ramsey
cd2d09c356
Introduce Converter namespace and move Number and Time classes into it
2014-11-08 14:43:09 -05: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
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
b28029fbc7
Add support for MS GUIDs
2014-10-30 15:13:45 +01: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