Set the UUID generator to use. If not set, the phpcr-utils UUIDHelper
will be used.
public setUuidGenerator ( Closure $generator ) | ||
$generator | Closure |
public function testUuid() { $class = new \ReflectionClass('Jackalope\\Transport\\DoctrineDBAL\\Client'); $method = $class->getMethod('generateUuid'); $method->setAccessible(true); $this->assertInternalType('string', $method->invoke($this->transport)); $this->transport->setUuidGenerator(function () { return 'like-a-uuid'; }); $this->assertEquals('like-a-uuid', $method->invoke($this->transport)); }