Author: Benjamin Eberlei (kontakt@beberlei.de)
Author: Lukas Kahwe Smith (smith@pooteeweet.org)
Inheritance: extends Jackalope\Transport\BaseTransport, implements Jackalope\Transport\QueryInterface, implements Jackalope\Transport\WritingInterface, implements Jackalope\Transport\WorkspaceManagementInterface, implements Jackalope\Transport\NodeTypeManagementInterface, implements Jackalope\Transport\TransactionInterface
 public function setUp()
 {
     parent::setUp();
     $conn = $this->getConnection();
     $this->loadFixtures($conn);
     $this->transport = $this->getClient($conn);
     $this->transport->createWorkspace('default');
     $this->repository = new \Jackalope\Repository(null, $this->transport);
     try {
         $this->transport->createWorkspace($GLOBALS['phpcr.workspace']);
     } catch (\PHPCR\RepositoryException $e) {
         if ($e->getMessage() != "Workspace '" . $GLOBALS['phpcr.workspace'] . "' already exists") {
             // if the message is not that the workspace already exists, something went really wrong
             throw $e;
         }
     }
     $this->session = $this->repository->login(new \PHPCR\SimpleCredentials("user", "passwd"), $GLOBALS['phpcr.workspace']);
 }
Esempio n. 2
0
 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));
 }
Esempio n. 3
0
 /**
  * {@inheritDoc}
  */
 public function setTransactionTimeout($seconds)
 {
     return $this->transport->setTransactionTimeout($seconds);
 }
 /**
  * {@inheritDoc}
  */
 public function rollbackTransaction()
 {
     parent::rollbackTransaction();
     $this->clearCaches(array_keys($this->caches));
 }
Esempio n. 5
0
 /**
  * {@inheritDoc}
  */
 public function rollbackTransaction()
 {
     parent::rollbackTransaction();
     $this->caches['meta']->deleteAll();
     if (isset($this->caches['nodes'])) {
         $this->caches['nodes']->deleteAll();
     }
 }