/**
* @author Rob Graham
*
* Test the registering of a version of a document, state should be set to STATE_FROZEN
*/
public function testRegisterDocumentForVersion()
{
// create a node of type frozenNode (which is a version)
$node = $this->createNode('/version/doc', 'foo', 'nt:frozenNode');
$document = $this->uow->getOrCreateDocument($this->type, $node);
$this->uow->registerDocument($document, '/version/doc');
$this->assertEquals(UnitOfWork::STATE_FROZEN, $this->uow->getDocumentState($document), 'A version of a document is frozen as expected');
}