diff --git a/CHANGELOG.md b/CHANGELOG.md index e4a9b58..7f50688 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# Rhumsaa\Uuid Changelog +# Ramsey\Uuid Changelog ## 2.8.0 diff --git a/README.md b/README.md index f044ea3..e0b9b23 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Rhumsaa\Uuid for PHP +# Ramsey\Uuid for PHP [![Build Status](https://travis-ci.org/ramsey/uuid.svg?branch=master)](https://travis-ci.org/ramsey/uuid) [![Coverage Status](https://coveralls.io/repos/ramsey/uuid/badge.svg?branch=master)](https://coveralls.io/r/ramsey/uuid) @@ -8,7 +8,7 @@ ## About -Rhumsaa\Uuid is a PHP 5.4+ library for generating and working with +Ramsey\Uuid is a PHP 5.4+ library for generating and working with [RFC 4122][rfc4122] version 1, 3, 4, and 5 universally unique identifiers (UUID). From [Wikipedia](http://en.wikipedia.org/wiki/Universally_unique_identifier): @@ -43,7 +43,7 @@ library are recommended. However, this library is designed to work on 32-bit builds of PHP without Moontoast\Math, with some degraded functionality. Please check the API documentation for more information. -If a particular requirement is not present, then a `Rhumsaa\Uuid\Exception\UnsatisfiedDependencyException` +If a particular requirement is not present, then a `Ramsey\Uuid\Exception\UnsatisfiedDependencyException` is thrown, allowing one to catch a bad call in an environment where the call is not supported and gracefully degrade. @@ -53,8 +53,8 @@ not supported and gracefully degrade. add(new Command\GenerateCommand()); diff --git a/composer.json b/composer.json index 14c38c2..5427177 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "rhumsaa/uuid", + "name": "ramsey/uuid", "description": "A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", "type": "library", "keywords": ["uuid", "identifier", "guid"], @@ -40,7 +40,7 @@ "doctrine/dbal": "Allow the use of a UUID as doctrine field type." }, "autoload": { - "psr-4": {"Rhumsaa\\Uuid\\": "src/"} + "psr-4": {"Ramsey\\Uuid\\": "src/"} }, "extra": { "branch-alias": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index c8ee44a..dc63149 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -11,7 +11,7 @@ - diff --git a/src/Builder/DefaultUuidBuilder.php b/src/Builder/DefaultUuidBuilder.php index 0cf6720..b6e2282 100644 --- a/src/Builder/DefaultUuidBuilder.php +++ b/src/Builder/DefaultUuidBuilder.php @@ -1,11 +1,11 @@ '00000000', @@ -136,7 +136,7 @@ class Uuid implements UuidInterface, \JsonSerializable * * @param array $fields * @param CodecInterface $codec String codec - * @link Rhumsaa.Uuid.Uuid.html#method_getFields + * @link Ramsey.Uuid.Uuid.html#method_getFields */ public function __construct(array $fields, NumberConverterInterface $converter, CodecInterface $codec) { @@ -760,7 +760,7 @@ class Uuid implements UuidInterface, \JsonSerializable * * @param string|\Moontoast\Math\BigNumber $integer String/BigNumber representation of UUID integer * @throws Exception\UnsatisfiedDependencyException If Moontoast\Math\BigNumber is not present - * @return \Rhumsaa\Uuid\Uuid + * @return \Ramsey\Uuid\Uuid */ public static function fromInteger($integer) { diff --git a/src/UuidBuilder.php b/src/UuidBuilder.php index 29b253b..ec99e70 100644 --- a/src/UuidBuilder.php +++ b/src/UuidBuilder.php @@ -1,6 +1,6 @@ assertInstanceOf('Rhumsaa\\Uuid\\Console\\Application', $app); + $this->assertInstanceOf('Ramsey\\Uuid\\Console\\Application', $app); $this->assertEquals('uuid', $app->getName()); - $this->assertEquals(\Rhumsaa\Uuid\Uuid::VERSION, $app->getVersion()); + $this->assertEquals(\Ramsey\Uuid\Uuid::VERSION, $app->getVersion()); } } diff --git a/tests/Console/Command/DecodeCommandTest.php b/tests/Console/Command/DecodeCommandTest.php index fc70b64..d32de49 100644 --- a/tests/Console/Command/DecodeCommandTest.php +++ b/tests/Console/Command/DecodeCommandTest.php @@ -1,10 +1,10 @@ execute = new \ReflectionMethod('Rhumsaa\\Uuid\\Console\\Command\\DecodeCommand', 'execute'); + $this->execute = new \ReflectionMethod('Ramsey\\Uuid\\Console\\Command\\DecodeCommand', 'execute'); $this->execute->setAccessible(true); $this->decode = new DecodeCommand(); - $this->decode->setApplication(new \Rhumsaa\Uuid\Console\Application()); + $this->decode->setApplication(new \Ramsey\Uuid\Console\Application()); } /** - * @covers Rhumsaa\Uuid\Console\Command\DecodeCommand::configure + * @covers Ramsey\Uuid\Console\Command\DecodeCommand::configure */ public function testConfigure() { @@ -35,8 +35,8 @@ class DecodeCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\DecodeCommand::execute - * @expectedException Rhumsaa\Uuid\Console\Exception + * @covers Ramsey\Uuid\Console\Command\DecodeCommand::execute + * @expectedException Ramsey\Uuid\Console\Exception * @expectedExceptionMessage Invalid UUID */ public function testExecuteForInvalidUuid() @@ -52,7 +52,7 @@ class DecodeCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\DecodeCommand::execute + * @covers Ramsey\Uuid\Console\Command\DecodeCommand::execute */ public function testExecuteForNonRFC4122Uuid() { @@ -71,7 +71,7 @@ class DecodeCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\DecodeCommand::execute + * @covers Ramsey\Uuid\Console\Command\DecodeCommand::execute */ public function testExecuteForVersion1Uuid() { @@ -90,7 +90,7 @@ class DecodeCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\DecodeCommand::execute + * @covers Ramsey\Uuid\Console\Command\DecodeCommand::execute */ public function testExecuteForVersion2Uuid() { @@ -109,7 +109,7 @@ class DecodeCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\DecodeCommand::execute + * @covers Ramsey\Uuid\Console\Command\DecodeCommand::execute */ public function testExecuteForVersion3Uuid() { @@ -128,7 +128,7 @@ class DecodeCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\DecodeCommand::execute + * @covers Ramsey\Uuid\Console\Command\DecodeCommand::execute */ public function testExecuteForVersion4Uuid() { @@ -147,7 +147,7 @@ class DecodeCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\DecodeCommand::execute + * @covers Ramsey\Uuid\Console\Command\DecodeCommand::execute */ public function testExecuteForVersion5Uuid() { diff --git a/tests/Console/Command/GenerateCommandTest.php b/tests/Console/Command/GenerateCommandTest.php index 93f9f1b..3f7c203 100644 --- a/tests/Console/Command/GenerateCommandTest.php +++ b/tests/Console/Command/GenerateCommandTest.php @@ -1,9 +1,9 @@ execute = new \ReflectionMethod('Rhumsaa\\Uuid\\Console\\Command\\GenerateCommand', 'execute'); + $this->execute = new \ReflectionMethod('Ramsey\\Uuid\\Console\\Command\\GenerateCommand', 'execute'); $this->execute->setAccessible(true); } /** - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::configure + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::configure */ public function testConfigure() { @@ -32,8 +32,8 @@ class GenerateCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::execute - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::createUuid + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::execute + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::createUuid */ public function testExecuteForUuidDefault() { @@ -54,8 +54,8 @@ class GenerateCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::execute - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::createUuid + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::execute + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::createUuid */ public function testExecuteForUuidDefaultWithCount() { @@ -101,8 +101,8 @@ class GenerateCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::execute - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::createUuid + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::execute + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::createUuid */ public function testExecuteForUuidSpecifyVersion1() { @@ -123,8 +123,8 @@ class GenerateCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::execute - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::createUuid + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::execute + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::createUuid */ public function testExecuteForUuidSpecifyVersion1WithCount() { @@ -170,8 +170,8 @@ class GenerateCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::execute - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::createUuid + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::execute + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::createUuid */ public function testExecuteForUuidSpecifyVersion4() { @@ -192,8 +192,8 @@ class GenerateCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::execute - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::createUuid + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::execute + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::createUuid */ public function testExecuteForUuidSpecifyVersion4WithCount() { @@ -239,9 +239,9 @@ class GenerateCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::execute - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::createUuid - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::validateNamespace + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::execute + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::createUuid + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::validateNamespace */ public function testExecuteForUuidSpecifyVersion3WithDnsNs() { @@ -263,9 +263,9 @@ class GenerateCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::execute - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::createUuid - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::validateNamespace + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::execute + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::createUuid + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::validateNamespace */ public function testExecuteForUuidSpecifyVersion3WithUrlNs() { @@ -287,9 +287,9 @@ class GenerateCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::execute - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::createUuid - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::validateNamespace + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::execute + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::createUuid + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::validateNamespace */ public function testExecuteForUuidSpecifyVersion3WithOidNs() { @@ -311,9 +311,9 @@ class GenerateCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::execute - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::createUuid - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::validateNamespace + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::execute + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::createUuid + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::validateNamespace */ public function testExecuteForUuidSpecifyVersion3WithX500Ns() { @@ -335,9 +335,9 @@ class GenerateCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::execute - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::createUuid - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::validateNamespace + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::execute + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::createUuid + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::validateNamespace */ public function testExecuteForUuidSpecifyVersion3WithOtherNs() { @@ -359,10 +359,10 @@ class GenerateCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::execute - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::createUuid - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::validateNamespace - * @expectedException Rhumsaa\Uuid\Console\Exception + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::execute + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::createUuid + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::validateNamespace + * @expectedException Ramsey\Uuid\Console\Exception * @expectedExceptionMessage May be either a UUID in string representation or an identifier */ public function testExecuteForUuidSpecifyVersion3WithInvalidNs() @@ -380,9 +380,9 @@ class GenerateCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::execute - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::createUuid - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::validateNamespace + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::execute + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::createUuid + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::validateNamespace */ public function testExecuteForUuidSpecifyVersion3WithCount() { @@ -407,10 +407,10 @@ class GenerateCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::execute - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::createUuid - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::validateNamespace - * @expectedException Rhumsaa\Uuid\Console\Exception + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::execute + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::createUuid + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::validateNamespace + * @expectedException Ramsey\Uuid\Console\Exception * @expectedExceptionMessage The name argument is required for version 3 or 5 UUIDs */ public function testExecuteForUuidSpecifyVersion3WithoutName() @@ -428,9 +428,9 @@ class GenerateCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::execute - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::createUuid - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::validateNamespace + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::execute + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::createUuid + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::validateNamespace */ public function testExecuteForUuidSpecifyVersion5WithDnsNs() { @@ -452,9 +452,9 @@ class GenerateCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::execute - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::createUuid - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::validateNamespace + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::execute + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::createUuid + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::validateNamespace */ public function testExecuteForUuidSpecifyVersion5WithUrlNs() { @@ -476,9 +476,9 @@ class GenerateCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::execute - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::createUuid - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::validateNamespace + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::execute + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::createUuid + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::validateNamespace */ public function testExecuteForUuidSpecifyVersion5WithOidNs() { @@ -500,9 +500,9 @@ class GenerateCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::execute - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::createUuid - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::validateNamespace + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::execute + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::createUuid + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::validateNamespace */ public function testExecuteForUuidSpecifyVersion5WithX500Ns() { @@ -524,9 +524,9 @@ class GenerateCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::execute - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::createUuid - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::validateNamespace + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::execute + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::createUuid + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::validateNamespace */ public function testExecuteForUuidSpecifyVersion5WithOtherNs() { @@ -548,10 +548,10 @@ class GenerateCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::execute - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::createUuid - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::validateNamespace - * @expectedException Rhumsaa\Uuid\Console\Exception + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::execute + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::createUuid + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::validateNamespace + * @expectedException Ramsey\Uuid\Console\Exception * @expectedExceptionMessage May be either a UUID in string representation or an identifier */ public function testExecuteForUuidSpecifyVersion5WithInvalidNs() @@ -569,9 +569,9 @@ class GenerateCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::execute - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::createUuid - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::validateNamespace + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::execute + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::createUuid + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::validateNamespace */ public function testExecuteForUuidSpecifyVersion5WithCount() { @@ -596,10 +596,10 @@ class GenerateCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::execute - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::createUuid - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::validateNamespace - * @expectedException Rhumsaa\Uuid\Console\Exception + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::execute + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::createUuid + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::validateNamespace + * @expectedException Ramsey\Uuid\Console\Exception * @expectedExceptionMessage The name argument is required for version 3 or 5 UUIDs */ public function testExecuteForUuidSpecifyVersion5WithoutName() @@ -617,9 +617,9 @@ class GenerateCommandTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::execute - * @covers Rhumsaa\Uuid\Console\Command\GenerateCommand::createUuid - * @expectedException Rhumsaa\Uuid\Console\Exception + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::execute + * @covers Ramsey\Uuid\Console\Command\GenerateCommand::createUuid + * @expectedException Ramsey\Uuid\Console\Exception * @expectedExceptionMessage Invalid UUID version. Supported are version "1", "3", "4", and "5". */ public function testExecuteForUuidSpecifyInvalidVersion() diff --git a/tests/Console/TestCase.php b/tests/Console/TestCase.php index 19f4695..727b9c1 100644 --- a/tests/Console/TestCase.php +++ b/tests/Console/TestCase.php @@ -1,7 +1,7 @@ type->convertToPHPValue('ff6f8cb0-c57d-11e1-9b21-0800200c9a66', $this->platform); - $this->assertInstanceOf('Rhumsaa\Uuid\Uuid', $uuid); + $this->assertInstanceOf('Ramsey\Uuid\Uuid', $uuid); $this->assertEquals('ff6f8cb0-c57d-11e1-9b21-0800200c9a66', $uuid->toString()); } /** - * @covers Rhumsaa\Uuid\Doctrine\UuidType::convertToPHPValue + * @covers Ramsey\Uuid\Doctrine\UuidType::convertToPHPValue */ public function testInvalidUuidConversionForPHPValue() { @@ -80,7 +80,7 @@ class UuidTypeTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Doctrine\UuidType::convertToPHPValue + * @covers Ramsey\Uuid\Doctrine\UuidType::convertToPHPValue */ public function testNullConversionForPHPValue() { @@ -88,7 +88,7 @@ class UuidTypeTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Doctrine\UuidType::getName + * @covers Ramsey\Uuid\Doctrine\UuidType::getName */ public function testGetName() { @@ -96,7 +96,7 @@ class UuidTypeTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Doctrine\UuidType::getSqlDeclaration + * @covers Ramsey\Uuid\Doctrine\UuidType::getSqlDeclaration */ public function testGetGuidTypeDeclarationSQL() { @@ -104,7 +104,7 @@ class UuidTypeTest extends TestCase } /** - * @covers Rhumsaa\Uuid\Doctrine\UuidType::requiresSQLCommentHint + * @covers Ramsey\Uuid\Doctrine\UuidType::requiresSQLCommentHint */ public function testRequiresSQLCommentHint() { diff --git a/tests/PeclUuidTest.php b/tests/PeclUuidTest.php index bf8529e..3b368db 100644 --- a/tests/PeclUuidTest.php +++ b/tests/PeclUuidTest.php @@ -1,6 +1,6 @@ mockFactory = $this->getMock('Rhumsaa\Uuid\UuidFactoryInterface'); + $this->mockFactory = $this->getMock('Ramsey\Uuid\UuidFactoryInterface'); Uuid::setFactory(new PeclUuidFactory($this->mockFactory)); } diff --git a/tests/RandomGeneratorFactoryTest.php b/tests/RandomGeneratorFactoryTest.php index 130b7eb..590a7b4 100644 --- a/tests/RandomGeneratorFactoryTest.php +++ b/tests/RandomGeneratorFactoryTest.php @@ -1,6 +1,6 @@ assertNotInstanceOf('\Rhumsaa\Uuid\Generator\OpenSslGenerator', $generator); + $this->assertNotInstanceOf('\Ramsey\Uuid\Generator\OpenSslGenerator', $generator); } public function testFactoryReturnsOpenSslGeneratorIfAvailable() @@ -19,6 +19,6 @@ class RandomGeneratorFactoryTest extends TestCase $generator = RandomGeneratorFactory::getGenerator(); - $this->assertInstanceOf('\Rhumsaa\Uuid\Generator\OpenSslGenerator', $generator); + $this->assertInstanceOf('\Ramsey\Uuid\Generator\OpenSslGenerator', $generator); } } diff --git a/tests/TestCase.php b/tests/TestCase.php index 7427eb7..b8e12ef 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -1,5 +1,5 @@ assertInstanceOf('\Rhumsaa\Uuid\Uuid', $uuid); + $this->assertInstanceOf('\Ramsey\Uuid\Uuid', $uuid); $this->assertEquals('ff6f8cb0-c57d-11e1-9b21-0800200c9a66', $uuid->toString()); } @@ -36,7 +36,7 @@ class UuidBcTag1_1_2Test extends \PHPUnit_Framework_TestCase public function testFromStringWithCurlyBraces() { $uuid = Uuid::fromString('{ff6f8cb0-c57d-11e1-9b21-0800200c9a66}'); - $this->assertInstanceOf('\Rhumsaa\Uuid\Uuid', $uuid); + $this->assertInstanceOf('\Ramsey\Uuid\Uuid', $uuid); $this->assertEquals('ff6f8cb0-c57d-11e1-9b21-0800200c9a66', $uuid->toString()); } @@ -54,7 +54,7 @@ class UuidBcTag1_1_2Test extends \PHPUnit_Framework_TestCase public function testFromStringWithUrn() { $uuid = Uuid::fromString('urn:uuid:ff6f8cb0-c57d-11e1-9b21-0800200c9a66'); - $this->assertInstanceOf('\Rhumsaa\Uuid\Uuid', $uuid); + $this->assertInstanceOf('\Ramsey\Uuid\Uuid', $uuid); $this->assertEquals('ff6f8cb0-c57d-11e1-9b21-0800200c9a66', $uuid->toString()); } @@ -106,7 +106,7 @@ class UuidBcTag1_1_2Test extends \PHPUnit_Framework_TestCase } /** - * @expectedException Rhumsaa\Uuid\Exception\UnsupportedOperationException + * @expectedException Ramsey\Uuid\Exception\UnsupportedOperationException * @expectedExceptionMessage Not a time-based UUID */ public function testGetDateTimeFromNonVersion1Uuid() @@ -207,7 +207,7 @@ class UuidBcTag1_1_2Test extends \PHPUnit_Framework_TestCase } /** - * @expectedException Rhumsaa\Uuid\Exception\UnsupportedOperationException + * @expectedException Ramsey\Uuid\Exception\UnsupportedOperationException * @expectedExceptionMessage Not a time-based UUID */ public function testGetTimestampFromNonVersion1Uuid() @@ -353,7 +353,7 @@ class UuidBcTag1_1_2Test extends \PHPUnit_Framework_TestCase public function testUuid1() { $uuid = Uuid::uuid1(); - $this->assertInstanceOf('\Rhumsaa\Uuid\Uuid', $uuid); + $this->assertInstanceOf('\Ramsey\Uuid\Uuid', $uuid); $this->assertInstanceOf('\DateTime', $uuid->getDateTime()); $this->assertEquals(2, $uuid->getVariant()); $this->assertEquals(1, $uuid->getVersion()); @@ -364,7 +364,7 @@ class UuidBcTag1_1_2Test extends \PHPUnit_Framework_TestCase public function testUuid1WithNodeAndClockSequence() { $uuid = Uuid::uuid1(0x0800200c9a66, 0x1669); - $this->assertInstanceOf('\Rhumsaa\Uuid\Uuid', $uuid); + $this->assertInstanceOf('\Ramsey\Uuid\Uuid', $uuid); $this->assertInstanceOf('\DateTime', $uuid->getDateTime()); $this->assertEquals(2, $uuid->getVariant()); $this->assertEquals(1, $uuid->getVersion()); @@ -380,7 +380,7 @@ class UuidBcTag1_1_2Test extends \PHPUnit_Framework_TestCase Uuid::setFactory(new UuidFactory(new FeatureSet(false, false, false, true))); $uuid = Uuid::uuid1(); - $this->assertInstanceOf('\Rhumsaa\Uuid\Uuid', $uuid); + $this->assertInstanceOf('\Ramsey\Uuid\Uuid', $uuid); $this->assertInstanceOf('\DateTime', $uuid->getDateTime()); $this->assertEquals(2, $uuid->getVariant()); $this->assertEquals(1, $uuid->getVersion()); @@ -420,7 +420,7 @@ class UuidBcTag1_1_2Test extends \PHPUnit_Framework_TestCase public function testUuid4() { $uuid = Uuid::uuid4(); - $this->assertInstanceOf('Rhumsaa\Uuid\Uuid', $uuid); + $this->assertInstanceOf('Ramsey\Uuid\Uuid', $uuid); $this->assertEquals(2, $uuid->getVariant()); $this->assertEquals(4, $uuid->getVersion()); } diff --git a/tests/UuidFactoryTest.php b/tests/UuidFactoryTest.php index b5ca218..62ac35b 100644 --- a/tests/UuidFactoryTest.php +++ b/tests/UuidFactoryTest.php @@ -1,6 +1,6 @@ assertInstanceOf('\Rhumsaa\Uuid\Uuid', $uuid); + $this->assertInstanceOf('\Ramsey\Uuid\Uuid', $uuid); $this->assertEquals('ff6f8cb0-c57d-11e1-9b21-0800200c9a66', $uuid->toString()); } @@ -34,7 +34,7 @@ class UuidTest extends TestCase $guid = Uuid::fromString('b08c6fff-7dc5-e111-9b21-0800200c9a66'); - $this->assertInstanceOf('\Rhumsaa\Uuid\Uuid', $guid); + $this->assertInstanceOf('\Ramsey\Uuid\Uuid', $guid); // UUID's and GUID's share the same textual representation $this->assertEquals($uuid->toString(), $guid->toString()); // But not the same binary representation @@ -46,7 +46,7 @@ class UuidTest extends TestCase public function testFromStringWithCurlyBraces() { $uuid = Uuid::fromString('{ff6f8cb0-c57d-11e1-9b21-0800200c9a66}'); - $this->assertInstanceOf('\Rhumsaa\Uuid\Uuid', $uuid); + $this->assertInstanceOf('\Ramsey\Uuid\Uuid', $uuid); $this->assertEquals('ff6f8cb0-c57d-11e1-9b21-0800200c9a66', $uuid->toString()); } @@ -64,7 +64,7 @@ class UuidTest extends TestCase public function testFromStringWithUrn() { $uuid = Uuid::fromString('urn:uuid:ff6f8cb0-c57d-11e1-9b21-0800200c9a66'); - $this->assertInstanceOf('\Rhumsaa\Uuid\Uuid', $uuid); + $this->assertInstanceOf('\Ramsey\Uuid\Uuid', $uuid); $this->assertEquals('ff6f8cb0-c57d-11e1-9b21-0800200c9a66', $uuid->toString()); } @@ -179,7 +179,7 @@ class UuidTest extends TestCase } /** - * @expectedException Rhumsaa\Uuid\Exception\UnsatisfiedDependencyException + * @expectedException Ramsey\Uuid\Exception\UnsatisfiedDependencyException */ public function testGetDateTimeThrownException() { @@ -187,14 +187,14 @@ class UuidTest extends TestCase $uuid = Uuid::fromString('ff6f8cb0-c57d-11e1-9b21-0800200c9a66'); - $this->assertInstanceOf('Rhumsaa\Uuid\DegradedUuid', $uuid); - $this->assertInstanceOf('Rhumsaa\Uuid\Converter\Number\DegradedNumberConverter', $uuid->getNumberConverter()); + $this->assertInstanceOf('Ramsey\Uuid\DegradedUuid', $uuid); + $this->assertInstanceOf('Ramsey\Uuid\Converter\Number\DegradedNumberConverter', $uuid->getNumberConverter()); $date = $uuid->getDateTime(); } /** - * @expectedException Rhumsaa\Uuid\Exception\UnsupportedOperationException + * @expectedException Ramsey\Uuid\Exception\UnsupportedOperationException * @expectedExceptionMessage Not a time-based UUID */ public function testGetDateTimeFromNonVersion1Uuid() @@ -225,7 +225,7 @@ class UuidTest extends TestCase } /** - * @expectedException Rhumsaa\Uuid\Exception\UnsatisfiedDependencyException + * @expectedException Ramsey\Uuid\Exception\UnsatisfiedDependencyException */ public function testGetFields32Bit() { @@ -265,7 +265,7 @@ class UuidTest extends TestCase } /** - * @expectedException Rhumsaa\Uuid\Exception\UnsatisfiedDependencyException + * @expectedException Ramsey\Uuid\Exception\UnsatisfiedDependencyException */ public function testGetLeastSignificantBitsException() { @@ -295,7 +295,7 @@ class UuidTest extends TestCase } /** - * @expectedException Rhumsaa\Uuid\Exception\UnsatisfiedDependencyException + * @expectedException Ramsey\Uuid\Exception\UnsatisfiedDependencyException */ public function testGetMostSignificantBitsException() { @@ -324,7 +324,7 @@ class UuidTest extends TestCase } /** - * @expectedException Rhumsaa\Uuid\Exception\UnsatisfiedDependencyException + * @expectedException Ramsey\Uuid\Exception\UnsatisfiedDependencyException */ public function testGetNode32Bit() { @@ -369,7 +369,7 @@ class UuidTest extends TestCase } /** - * @expectedException Rhumsaa\Uuid\Exception\UnsatisfiedDependencyException + * @expectedException Ramsey\Uuid\Exception\UnsatisfiedDependencyException */ public function testGetTimeLow32Bit() { @@ -432,7 +432,7 @@ class UuidTest extends TestCase } /** - * @expectedException Rhumsaa\Uuid\Exception\UnsupportedOperationException + * @expectedException Ramsey\Uuid\Exception\UnsupportedOperationException * @expectedExceptionMessage Not a time-based UUID */ public function testGetTimestampFromNonVersion1Uuid() @@ -443,7 +443,7 @@ class UuidTest extends TestCase } /** - * @expectedException Rhumsaa\Uuid\Exception\UnsupportedOperationException + * @expectedException Ramsey\Uuid\Exception\UnsupportedOperationException * @expectedExceptionMessage Not a time-based UUID */ public function testGetTimestampHexFromNonVersion1Uuid() @@ -454,7 +454,7 @@ class UuidTest extends TestCase } /** - * @expectedException Rhumsaa\Uuid\Exception\UnsatisfiedDependencyException + * @expectedException Ramsey\Uuid\Exception\UnsatisfiedDependencyException */ public function testGetTimestamp32Bit() { @@ -600,7 +600,7 @@ class UuidTest extends TestCase public function testUuid1() { $uuid = Uuid::uuid1(); - $this->assertInstanceOf('\Rhumsaa\Uuid\Uuid', $uuid); + $this->assertInstanceOf('\Ramsey\Uuid\Uuid', $uuid); $this->assertInstanceOf('\DateTime', $uuid->getDateTime()); $this->assertEquals(2, $uuid->getVariant()); $this->assertEquals(1, $uuid->getVersion()); @@ -613,7 +613,7 @@ class UuidTest extends TestCase $this->skip64BitTest(); $uuid = Uuid::uuid1(0x0800200c9a66, 0x1669); - $this->assertInstanceOf('\Rhumsaa\Uuid\Uuid', $uuid); + $this->assertInstanceOf('\Ramsey\Uuid\Uuid', $uuid); $this->assertInstanceOf('\DateTime', $uuid->getDateTime()); $this->assertEquals(2, $uuid->getVariant()); $this->assertEquals(1, $uuid->getVersion()); @@ -628,7 +628,7 @@ class UuidTest extends TestCase { $uuid = Uuid::uuid1('7160355e'); - $this->assertInstanceOf('\Rhumsaa\Uuid\Uuid', $uuid); + $this->assertInstanceOf('\Ramsey\Uuid\Uuid', $uuid); $this->assertInstanceOf('\DateTime', $uuid->getDateTime()); $this->assertEquals(2, $uuid->getVariant()); $this->assertEquals(1, $uuid->getVersion()); @@ -645,7 +645,7 @@ class UuidTest extends TestCase { $uuid = Uuid::uuid1('71B0aD5e'); - $this->assertInstanceOf('\Rhumsaa\Uuid\Uuid', $uuid); + $this->assertInstanceOf('\Ramsey\Uuid\Uuid', $uuid); $this->assertInstanceOf('\DateTime', $uuid->getDateTime()); $this->assertEquals(2, $uuid->getVariant()); $this->assertEquals(1, $uuid->getVersion()); @@ -661,7 +661,7 @@ class UuidTest extends TestCase public function testUuid1WithNodeAndClockSequence32Bit() { $uuid = Uuid::uuid1(0x7fffffff, 0x1669); - $this->assertInstanceOf('\Rhumsaa\Uuid\Uuid', $uuid); + $this->assertInstanceOf('\Ramsey\Uuid\Uuid', $uuid); $this->assertInstanceOf('\DateTime', $uuid->getDateTime()); $this->assertEquals(2, $uuid->getVariant()); $this->assertEquals(1, $uuid->getVersion()); @@ -706,7 +706,7 @@ class UuidTest extends TestCase Uuid::setFactory(new UuidFactory(new FeatureSet(false, false, false, true))); $uuid = Uuid::uuid1(); - $this->assertInstanceOf('\Rhumsaa\Uuid\Uuid', $uuid); + $this->assertInstanceOf('\Ramsey\Uuid\Uuid', $uuid); $this->assertInstanceOf('\DateTime', $uuid->getDateTime()); $this->assertEquals(2, $uuid->getVariant()); $this->assertEquals(1, $uuid->getVersion()); @@ -770,7 +770,7 @@ class UuidTest extends TestCase public function testUuid4() { $uuid = Uuid::uuid4(); - $this->assertInstanceOf('Rhumsaa\Uuid\Uuid', $uuid); + $this->assertInstanceOf('Ramsey\Uuid\Uuid', $uuid); $this->assertEquals(2, $uuid->getVariant()); $this->assertEquals(4, $uuid->getVersion()); } @@ -781,7 +781,7 @@ class UuidTest extends TestCase { RandomGeneratorFactory::$forceNoOpensslRandomPseudoBytes = true; $uuid = Uuid::uuid4(); - $this->assertInstanceOf('Rhumsaa\Uuid\Uuid', $uuid); + $this->assertInstanceOf('Ramsey\Uuid\Uuid', $uuid); $this->assertEquals(2, $uuid->getVariant()); $this->assertEquals(4, $uuid->getVersion()); } @@ -792,7 +792,7 @@ class UuidTest extends TestCase */ public function testUuid4Comb() { - $mock = $this->getMock('Rhumsaa\Uuid\RandomGeneratorInterface'); + $mock = $this->getMock('Ramsey\Uuid\RandomGeneratorInterface'); $mock->expects($this->any()) ->method('generate') ->willReturnCallback(function ($length) @@ -1222,7 +1222,7 @@ class UuidTest extends TestCase } /** - * @expectedException Rhumsaa\Uuid\Exception\UnsatisfiedDependencyException + * @expectedException Ramsey\Uuid\Exception\UnsatisfiedDependencyException */ public function testCalculateUuidTimeThrownException() { @@ -1323,8 +1323,8 @@ class UuidTest extends TestCase */ public function testUsingNilAsValidUuid() { - $this->assertInstanceOf('Rhumsaa\Uuid\Uuid', Uuid::uuid3(Uuid::NIL, 'randomtext')); - $this->assertInstanceOf('Rhumsaa\Uuid\Uuid', Uuid::uuid5(Uuid::NIL, 'randomtext')); + $this->assertInstanceOf('Ramsey\Uuid\Uuid', Uuid::uuid3(Uuid::NIL, 'randomtext')); + $this->assertInstanceOf('Ramsey\Uuid\Uuid', Uuid::uuid5(Uuid::NIL, 'randomtext')); } /** @@ -1403,7 +1403,7 @@ class UuidTest extends TestCase } /** - * This test ensures that Rhumsaa\Uuid passes the same test cases + * This test ensures that Ramsey\Uuid passes the same test cases * as the Python UUID library. * * Taken from the Python UUID tests in @@ -1731,8 +1731,8 @@ class UuidTest extends TestCase } /** - * @expectedException Rhumsaa\Uuid\Exception\UnsatisfiedDependencyException - * @expectedExceptionMessage Cannot call Rhumsaa\Uuid\Converter\Number\DegradedNumberConverter::fromHex without support for large integers + * @expectedException Ramsey\Uuid\Exception\UnsatisfiedDependencyException + * @expectedExceptionMessage Cannot call Ramsey\Uuid\Converter\Number\DegradedNumberConverter::fromHex without support for large integers */ public function testGetInteger() { diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 50e981f..b1857f4 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -16,4 +16,4 @@ date_default_timezone_set('UTC'); $loader = include realpath(dirname(__FILE__) . '/../vendor/autoload.php'); $loader->add("Doctrine\Tests\DBAL", __DIR__."/../vendor/doctrine/dbal/tests"); -$loader->addPsr4('Rhumsaa\\Uuid\\', __DIR__); +$loader->addPsr4('Ramsey\\Uuid\\', __DIR__);