Doctrine\Tests\ODM\PHPCR\UnitOfWorkTest::testUuid PHP Method

testUuid() public method

public testUuid ( )
    public function testUuid()
    {
        $class = new \ReflectionClass('Doctrine\\ODM\\PHPCR\\UnitOfWork');
        $method = $class->getMethod('generateUuid');
        $method->setAccessible(true);
        $this->assertInternalType('string', $method->invoke($this->uow));
        $config = new Configuration();
        $config->setUuidGenerator(function () {
            return 'like-a-uuid';
        });
        $dm = DocumentManager::create($this->session, $config);
        $uow = new UnitOfWork($dm);
        $this->assertEquals('like-a-uuid', $method->invoke($uow));
    }