Removing 32-bit exception thrown from the constructor

This commit is contained in:
Ben Ramsey
2013-01-04 21:41:46 -06:00
parent e2579ac565
commit a7766c0e40
2 changed files with 0 additions and 37 deletions
-7
View File
@@ -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;
}
-30
View File
@@ -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.');
}
}
}