Skip to content

Commit

Permalink
Merge pull request #62 from jdecool/uuid-interface-convert-php
Browse files Browse the repository at this point in the history
Handling UuidInterface instances in UuidType::convertToPHPValue
  • Loading branch information
ramsey committed Aug 11, 2018
2 parents 2a56db8 + c20559b commit a1d2db2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/UuidTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,18 @@ public function testNullConversionForDatabaseValue()
$this->assertNull($this->type->convertToDatabaseValue(null, $this->platform));
}

/**
* @covers Ramsey\Uuid\Doctrine\UuidType::convertToPHPValue
*/
public function testUuidInterfaceConvertsToPHPValue()
{
$uuid = \Mockery::mock('Ramsey\\Uuid\\UuidInterface');

$actual = $this->type->convertToPHPValue($uuid, $this->platform);

$this->assertSame($uuid, $actual);
}

/**
* @covers Ramsey\Uuid\Doctrine\UuidType::convertToPHPValue
*/
Expand Down

0 comments on commit a1d2db2

Please sign in to comment.