diff --git a/composer.json b/composer.json index b028293..ee0fa26 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "php": ">=5.3.3" }, "require-dev": { - "doctrine/dbal": "2.3.*", + "doctrine/dbal": ">=2.3", "moontoast/math": "1.1.0" }, "suggest": { diff --git a/tests/Rhumsaa/Uuid/Doctrine/UuidTypeTest.php b/tests/Rhumsaa/Uuid/Doctrine/UuidTypeTest.php index 306442c..c010deb 100644 --- a/tests/Rhumsaa/Uuid/Doctrine/UuidTypeTest.php +++ b/tests/Rhumsaa/Uuid/Doctrine/UuidTypeTest.php @@ -24,7 +24,11 @@ class UuidTypeTest extends PHPUnit_Framework_TestCase ); } - $this->platform = new MockPlatform(); + $this->platform = $this->getPlatformMock(); + $this->platform->expects($this->any()) + ->method('getGuidTypeDeclarationSQL') + ->will($this->returnValue('DUMMYVARCHAR()')); + $this->type = Type::getType('uuid'); } @@ -108,4 +112,14 @@ class UuidTypeTest extends PHPUnit_Framework_TestCase { $this->assertTrue($this->type->requiresSQLCommentHint($this->platform)); } + + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ + private function getPlatformMock() + { + return $this->getMockBuilder('Doctrine\DBAL\Platforms\AbstractPlatform') + ->setMethods(array('getGuidTypeDeclarationSQL')) + ->getMockForAbstractClass(); + } }