mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-16 16:17:43 +03:00
Full code-coverage for UuidType::convertToDatabaseValue
This commit is contained in:
@@ -41,6 +41,23 @@ class UuidTypeTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertEquals($expected, $actual);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Rhumsaa\Uuid\Doctrine\UuidType::convertToDatabaseValue
|
||||
*/
|
||||
public function testInvalidUuidConversionForDatabaseValue()
|
||||
{
|
||||
$this->setExpectedException('Doctrine\DBAL\Types\ConversionException');
|
||||
$this->type->convertToDatabaseValue('abcdefg', $this->platform);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Rhumsaa\Uuid\Doctrine\UuidType::convertToDatabaseValue
|
||||
*/
|
||||
public function testNullConversionForDatabaseValue()
|
||||
{
|
||||
$this->assertNull($this->type->convertToDatabaseValue(null, $this->platform));
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Rhumsaa\Uuid\Doctrine\UuidType::convertToPHPValue
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user