Commit Graph

42 Commits

Author SHA1 Message Date
Jessica Mauerhan 77dd2bc8f0 fix spacing 2016-03-23 09:26:47 -04:00
Jessica Mauerhan 944a202b0a fixing clean so it doesn't run on hhvm 2016-03-23 09:20:56 -04:00
Jessica Mauerhan 4c2a18bb78 prevent UUID_TYPE_TIME already defined error 2016-03-23 09:13:32 -04:00
Jessica Mauerhan 43b9b537a1 file line endings, tried using phpcbf so I can run phpcs locally and not get crazy output 2016-03-23 09:05:37 -04:00
Jessica Mauerhan b0484d3cab Fixing too long lines 2016-03-23 08:58:55 -04:00
Jessica Mauerhan 20ec151c9e Fixing too long lines 2016-03-23 08:43:22 -04:00
Jessica Mauerhan f93018f756 added open ssl generator tests 2016-03-23 08:37:20 -04:00
Jessica Mauerhan 35189e2a72 extend custom test case 2016-03-23 08:29:16 -04:00
Jessica Mauerhan 84cb29bb04 Set clockSeq on most tests, avoid calling mt_rand
- Just to ensure tests run isolated and not waste time using the mt_rand
  method.
2016-03-23 08:26:34 -04:00
Jessica Mauerhan 4cdb910b8c Tests DefaultTimeGenerator->generate 2016-03-23 08:24:43 -04:00
Jessica Mauerhan ce30f4d87a test stubs for DefaultTimeGenerator 2016-03-23 07:31:26 -04:00
Jessica Mauerhan e8cd683385 Move to correct namespace/directory 2016-03-23 07:26:04 -04:00
Jessica Mauerhan 7e8fef0ce1 merge 2016-03-23 07:23:42 -04:00
Jessica Mauerhan 70d7d6ff0b excluding aspect mock on hhvm 2016-03-22 19:25:52 -04:00
Jessica Mauerhan 61bded7d74 Skipping AspectMock tests on HHVM. 2016-03-22 16:50:36 -04:00
Jessica Mauerhan 767a935ff3 revert uuid test 2016-03-22 11:27:43 -04:00
Jessica Mauerhan 2c6e4b8b32 Add new line 2016-03-22 11:26:38 -04:00
Jessica Mauerhan 090c0cf188 PeclUuidGenerator tests. Added collaboration and correctness test 2016-03-22 11:13:01 -04:00
Jessica Mauerhan cfe3f84dbb Added coverage for uuid methods 2016-03-22 10:01:16 -04:00
Jessica Mauerhan 5afe09caea Tests using overload should be run in separate process 2016-03-17 01:16:00 -04:00
Jessica Mauerhan c0a6f9d426 apparently the phpunit on travis is older 2016-03-16 16:06:35 -04:00
Jessica Mauerhan ab0b2c5fa9 more new lines 2016-03-16 15:58:31 -04:00
Jessica Mauerhan 16bf69ad39 more new lines 2016-03-16 15:50:19 -04:00
Jessica Mauerhan c16b4f0cf2 add new line 2016-03-16 15:45:05 -04:00
Jessica Mauerhan 6b7241c5fc Comb Generator coverage 2016-03-16 13:07:04 -04:00
Jessica Mauerhan 392137b0a4 added test with multiple cases for generate 2016-03-16 12:10:07 -04:00
Jessica Mauerhan d290d45ae7 add test for phptimeconverter 2016-03-16 11:47:59 -04:00
Jessica Mauerhan 3ac0506203 Tests for UUID Builder classes. 2016-03-16 10:26:16 -04:00
Jessica Mauerhan 6b58154b76 remove files since phpcs doesn't tolerate them 2016-03-13 17:35:35 -04:00
Jessica Mauerhan 3764478b6b Ignoring side effect issue 2016-03-13 12:12:16 -04:00
Jessica Mauerhan 689940ec00 Ignore side-effect problem
This file is only used for testing, and is for overriding an extension's
global function for the test.
2016-03-13 11:56:57 -04:00
Jessica Mauerhan 48027c3fda Add new lines to end of file 2016-03-13 11:42:30 -04:00
Jessica Mauerhan 3290885a9c Test Coverage for PeclUuidTimeGenerator
- Uses namespaced function override to "mock" the pecl extension methods.
- Tests that method will create a uuid when extension methods exist.
2016-03-13 11:40:15 -04:00
Jessica Mauerhan cd00a9cb77 Add coverage of generate method 2016-03-13 11:09:51 -04:00
Jessica Mauerhan 30d71f250d Tests for RandomLibAdapter
- Requires Mockery for overloading creation of factory
- Tests for the constructor of the adapter.
2016-03-13 11:04:17 -04:00
Ben Ramsey 369efacd98 Fix test failing on PHP 5.4 because of ::class keyword name resolution 2016-02-13 20:45:33 -06:00
Ben Ramsey e4e38b4059 Add random generator for the PECL libsodium extension 2016-02-13 20:29:32 -06:00
Ben Ramsey cdeed9e65a Apply coding standards to tests, as well 2015-12-17 12:09:17 -06:00
frankdejonge 91d0c6da31 Fixes #91: Made Uuid's serializable. 2015-10-25 22:15:32 +01:00
Ben Ramsey 6d712900f4 Modify Travis CI builds to run tests on multiple CPU architectures
The ramsey/uuid library has requirements to run on 32-bit and 64-bit
systems, as well as little-endian and big-endian systems. Travis CI only
provides hardware for testing 64-bit, little-endian CPU architectures,
but they recently announced support for Docker[^1].

After some research, I found it is possible to use [QEMU][] with
[chroot][] jails on Travis CI to emulate other CPU architectures and run
tests through these chroot jails[^2]. Unfortunately, it takes an awful
long time to set up a chroot jail, build PHP within it, and run the
tests. It wasn't reasonable to expect to do this on every single push to
the ramsey/uuid repository. This is where Docker comes in.

I was able to create chroot jails for each architecture and version of
PHP combination I need to test and then turn these into Docker images,
which Travis is able to download and run fairly quickly. The instances
on which Travis CI is running their Docker services do not currently
support phpenv or php-build, so I needed to masquerade as a Python
project and specify all PHP versions and CPU architectures in
environment variables in my `.travis.yml` configuration. I run
`composer install` and report to Coveralls outside of the Docker images,
but all tests are run within the Docker images.

The Docker image I created for PHP 7.0.0RC4 on MIPS architecture
produces segfaults when attempting to build PHP with Phar. PHP builds
okay without Phar, but then it produces segfaults when running any PHP
script on the image, so I'm leaving out 7.0.0RC4 on MIPS for now.

The Docker images for use with ramsey/uuid tests are available here:
<https://hub.docker.com/r/benramsey/ramsey-uuid/>.

[^1]: "Using Docker on Travis
CI," <http://blog.travis-ci.com/2015-08-19-using-docker-on-travis-ci/>
[^2]: "Running Travis CI tests on ARM architecture,"
<https://www.tomaz.me/2013/12/02/running-travis-ci-tests-on-arm.html>

[qemu]: http://wiki.qemu.org/Main_Page
[chroot]: https://en.wikipedia.org/wiki/Chroot
2015-10-07 22:59:11 -05:00
Ben Ramsey c81933b700 Remove 1.1.2 backwards-compatibility tests 2015-10-03 11:00:08 -05:00
Ben Ramsey f5e96b6af7 Restructure tests 2015-10-03 10:59:44 -05:00