Marcel Hernandez
76efebe0ac
generate random clockSeq with random_int() instead of mt_rand()
2018-01-19 16:17:49 -06:00
Marcel Hernandez
3567caf3f9
fixed off-by-one error on DefaultTimeGenerator
2018-01-19 16:17:36 -06:00
Ben Ramsey
f203f13921
Fix broken build on PHP 5.4
2018-01-19 16:00:06 -06:00
Ben Ramsey
e67d6bfdc2
Revert to pre-1.x series of mockery/mockery for ramsey/uuid 3.x
2018-01-16 19:45:47 -06:00
Ben Ramsey
89c3c1777e
Fix capitalization of the getSysfs() method
2018-01-16 14:14:34 -06:00
Ben Ramsey
901c3e540d
Handle cases where glob() returns false
...
Fixes #203
2018-01-16 14:11:58 -06:00
Gabriel Caruso
f65471fb5c
Use assertSame
2017-12-10 05:51:10 -02:00
Robbert Müller
8a540b78a1
mock glob function to get assertions work
2017-11-17 16:16:29 +01:00
Robbert Müller
70346f5da3
Fix whitespace
2017-11-17 15:00:23 +01:00
Robbert Müller
a9154c4c27
add testcase for getsysfs
2017-11-17 14:52:51 +01:00
Ben Ramsey
6b0445588c
Merge branch 'master' into add-sysfs-option
2017-11-10 16:04:30 -06:00
Robbert Müller
3572bf8755
adapt testcases to also mock getsysfs, to get the old code path tested
2017-10-18 11:33:26 +02:00
Ben Peachey
58658b8f4d
Merge branch 'master' into fix/replace-deprecated-getMock
2017-10-18 08:57:31 +02:00
Ben Peachey
dbb9a8b6d1
Changes all usage in Tests of getMock with getMockBuilder.
2017-10-17 12:46:25 +02:00
Ben Ramsey
749b30e3f9
Add random node test that asserts multicast bit against random values
2017-09-22 15:46:04 -05:00
Ben Ramsey
5c38d41ccb
Use sprintf() to prefix zeros on the returned node hex string
2017-09-22 13:03:41 -05:00
Ben Ramsey
1ec0826a40
Set the multicast bit for random nodes, according to RFC 4122, §4.5
...
Borrows the idea from cf1c981414 to
properly set the multicast bit to the "least significant bit of the
first octet of the node ID."
When merged, this will close #171 and #170
2017-09-22 12:54:15 -05:00
Ben Ramsey
aab08bb08a
Use random_bytes() to generate a random node
2017-09-22 12:26:34 -05: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
02fc392d84
formatting
2016-10-18 08:53:11 -05:00
Jessica Mauerhan
bf1513433f
fixing formatting
2016-10-17 20:56:57 -05:00
Jessica Mauerhan
d4ece57761
Adding test coverage for getters/setters currently untested.
2016-10-17 20:53:01 -05:00
Ben Ramsey
2d19c68f5c
Merge pull request #138 from jmauerhan/master
...
Unit Tests: Add function mock test for systems without libsodium
2016-10-07 08:31:56 -05:00
Jessica Mauerhan
e0c2ff2a09
Fix code style
2016-10-06 11:10:40 -04:00
Jessica Mauerhan
761e5115be
Add function mock test for systems without libsodium
2016-10-04 16:23:36 -04:00
Jessica Mauerhan
65cc76f721
remove extra ; causing PHPCBF to fail
2016-10-02 10:27:23 -04:00
Jessica Mauerhan
0a620d1966
Added another failing test case for GH Issue $131
2016-09-30 16:00:46 -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
Andreas Möller
3f626579c3
Fix: Reduce visibility of setUp() and tearDown()
2016-09-08 10:24:25 +02:00
Ben Ramsey
2e674a1713
Merge pull request #118 from barryvdh/optimized
...
Codec to store UUID in an optimized way for InnoDB
2016-08-02 13:53:14 -04:00
Ben Ramsey
e53270fa14
Merge pull request #129 from ifunny/fix-random-node-provider
...
Fix RandomNodeProvider: change the max value in mt_rand() call to prevent invalid node generation
2016-08-02 12:05:02 -04:00
Ondrej Mirtes
aa869f93ff
Fixed undefined classes in GuidStringCodecTest properties
2016-08-01 21:07:53 +02:00
Anton Vasetskiy
4872dac723
Fix code style
2016-07-28 17:49:27 +03:00
Anton Vasetskiy
879fe3cfe2
Fix RandomNodeProvider: change the max value in mt_rand() call to prevent invalid node generation
2016-07-28 16:44:26 +03:00
Ben Ramsey
f03d3216fe
Follow similar pattern to that shown in other tests for system node
2016-06-25 00:23:57 +02:00
Ben Ramsey
42d24d5b44
Fix failing test due to collisions caused by not being run in isolation
2016-06-25 00:20:21 +02:00
Ben Ramsey
e865a0e2ff
Merge branch '107_cache_system_node_provider' of https://github.com/MLoureiro/uuid into MLoureiro-107_cache_system_node_provider
2016-06-24 23:58:19 +02:00
Marcos
6cb7128cbe
Cover that SystemNodeProvider::getNode returns false when it doesn't find node
2016-06-24 20:46:21 +02:00
Ben Ramsey
369bd5ae21
Ignore coding standards on lines in test
2016-06-24 16:44:21 +02:00
Marcos
dce9d0cb7d
Remove real call to ifconfig on unit test
2016-06-23 21:37:29 +02:00
Marcos
5dbd993b4b
Execute system call only once even if the node is not found
2016-06-23 21:03:07 +02:00
Barry vd. Heuvel
9112b2bd95
Test OrderedTimeCodecTest exception
2016-04-27 22:32:15 +02:00
Barry vd. Heuvel
ca0cc642aa
Add OrderedTimeCodec + test
2016-04-27 21:38:55 +02:00
Ben Ramsey
fcc5432d74
Fixed test that violated a PHP CodeSniffer rule, breaking the build
2016-04-23 19:29:59 -05:00
Alex Farcas
49cc97f5ee
Implemented timestamp first and timestamp last comb generators
2016-03-29 22:32:55 +03:00
Jessica Mauerhan
53e4bfe231
add uuid teardown - tearing down all set private variables reduces memory usage, prevents phpunit from running out of memory
2016-03-27 17:16:48 -04:00