mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-16 16:17:43 +03:00
Removing 32-bit exception thrown from the constructor
This commit is contained in:
@@ -108,13 +108,6 @@ class Uuid
|
||||
*/
|
||||
protected function __construct(array $fields)
|
||||
{
|
||||
if (PHP_INT_SIZE == 4) {
|
||||
throw new \OverflowException(
|
||||
'Attempting to create a UUID on a 32-bit build of PHP. This '
|
||||
. 'library requires a 64-bit build of PHP.'
|
||||
);
|
||||
}
|
||||
|
||||
$this->fields = $fields;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
<?php
|
||||
namespace Rhumsaa\Uuid;
|
||||
|
||||
/**
|
||||
* This class tests the environment to ensure the library functions as designed
|
||||
* on 32-bit and 64-bit environments.
|
||||
*/
|
||||
class EnvironmentTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers Rhumsaa\Uuid\Uuid::__construct
|
||||
*/
|
||||
public function testConstructorException()
|
||||
{
|
||||
if (PHP_INT_SIZE == 4) {
|
||||
|
||||
$this->setExpectedException(
|
||||
'OverflowException',
|
||||
'Attempting to create a UUID on a 32-bit build of PHP. This library requires a 64-bit build of PHP.'
|
||||
);
|
||||
|
||||
$uuid = Uuid::uuid1();
|
||||
|
||||
} else {
|
||||
|
||||
$this->markTestSkipped('This test is only applicable on a 32-bit system.');
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user