public function setUp() { parent::setUp(); $conn = $this->getConnection(); $options = array('disable_fks' => $conn->getDatabasePlatform() instanceof SqlitePlatform); $schema = new RepositorySchema($options, $conn); // do not use reset as we want to ignore exceptions on drop foreach ($schema->toDropSql($conn->getDatabasePlatform()) as $statement) { try { $conn->exec($statement); } catch (\Exception $e) { // ignore } } foreach ($schema->toSql($conn->getDatabasePlatform()) as $statement) { $conn->exec($statement); } $transport = $this->getTransport(); $repository = new \Jackalope\Repository(null, $transport); $session = $repository->login(new \PHPCR\SimpleCredentials("user", "passwd"), $GLOBALS['phpcr.workspace']); $a = $session->getNode('/')->addNode('node-a'); $a->addNode('child-a')->setProperty('prop', 'aa'); $a->addNode('child-b')->setProperty('prop', 'ab'); $b = $session->getNode('/')->addNode('node-b'); $b->addNode('child-a')->setProperty('prop', 'ba'); $b->addNode('child-b')->setProperty('prop', 'bb'); $session->save(); }
public function setUp() { parent::setUp(); $this->config['url'] = $GLOBALS['jackrabbit.uri']; }