fix unit tests to be compatible with doctrine/dbal >= 2.4.0
This commit is contained in:
Daniel Freudenberger
2013-09-18 00:23:37 +02:00
parent 4d746373fa
commit d4d5b45ab8
2 changed files with 16 additions and 2 deletions
+1 -1
View File
@@ -23,7 +23,7 @@
"php": ">=5.3.3"
},
"require-dev": {
"doctrine/dbal": "2.3.*",
"doctrine/dbal": ">=2.3",
"moontoast/math": "1.1.0"
},
"suggest": {
+15 -1
View File
@@ -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();
}
}