Full code-coverage for UuidType::convertToDatabaseValue

This commit is contained in:
Ben Ramsey
2012-08-06 20:17:18 -05:00
parent 554e002240
commit b78227ea5d
@@ -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
*/