protected function setUp() { $this->renewSession(); // get rid of cache from previous tests parent::setUp(); $this->ws = $this->session->getWorkspace(); }
public function setUp() { parent::setUp(); $this->node = $this->rootNode->getNode('tests_general_base'); $this->nodewithmixin = $this->node->getNode('multiValueProperty'); $this->deepnode = $this->nodewithmixin->getNode('deepnode'); }
protected function setUp() { $this->renewSession(); // reset session parent::setUp(); $this->workspace = $this->session->getWorkspace(); }
public function setUp() { parent::setUp(); $this->node = $this->session->getRootNode()->getNode('tests_general_base/numberPropertyNode/jcr:content'); $this->binaryProperty = $this->node->getProperty('jcr:data'); $this->assertEquals(\PHPCR\PropertyType::BINARY, $this->binaryProperty->getType()); }
public function setUp() { parent::setUp(); $this->vm = $this->session->getWorkspace()->getVersionManager(); $this->simpleVersioned = $this->vm->getBaseVersion('/tests_version_base/simpleVersioned'); $this->assertInstanceOf('PHPCR\\Version\\VersionInterface', $this->simpleVersioned); }
public function setUp() { $this->renewSession(); parent::setUp(); //all tests in this suite rely on the trick to have the node populated from the fixtures $this->assertInstanceOf('PHPCR\\NodeInterface', $this->node, 'Something went wrong with fixture loading'); }
public function setUp() { parent::setUp(); $this->workspace = $this->session->getWorkspace(); $this->nr = $this->workspace->getNamespaceRegistry(); //this function is tested in ReadTest/WorkspaceReadMethods.php::testGetNamespaceRegistry }
public function setUp() { parent::setUp(); $this->renewSession(); $this->node = $this->session->getNode('/tests_version_base/versionable'); $this->vm = $this->session->getWorkspace()->getVersionManager(); }
public function setUp() { parent::setUp(); $this->renewSession(); $this->node = $this->session->getNode('/tests_general_base/numberPropertyNode/jcr:content'); $this->property = $this->session->getProperty('/tests_general_base/numberPropertyNode/jcr:content/longNumber'); }
public function setUp() { $this->renewSession(); // kill cache between tests parent::setUp(); $this->assertInstanceOf('\\PHPCR\\NodeInterface', $this->node); }
public function setUp() { parent::setUp(); $this->vm = $this->session->getWorkspace()->getVersionManager(); $this->history = $this->vm->getVersionHistory('/tests_version_base/versioned'); $this->assertInstanceOf('PHPCR\\Version\\VersionHistoryInterface', $this->history); }
protected function setUp() { if (!class_exists('PHPCR\\Util\\NodeHelper')) { $this->markTestSkipped('This testbed does not have phpcr-utils available'); } parent::setUp(); }
public function setUp() { parent::setUp(); if (self::$loader->doesSessionLastModified()) { $this->markTestSkipped('Session updates lastModified automatically'); } }
public function setUp() { parent::setUp(); //all tests in this suite rely on the trick to have the node populated from the fixtures $this->assertInstanceOf('PHPCR\\NodeInterface', $this->node, 'Something went wrong with fixture loading'); $this->nodePath = $this->node->getPath(); $this->node = null; }
public function setUp() { parent::setUp(); $this->ntm = $this->session->getWorkspace()->getNodeTypeManager(); $this->file = $this->ntm->getNodeType('nt:file'); $this->folder = $this->ntm->getNodeType('nt:folder'); $this->resource = $this->ntm->getNodeType('nt:resource'); }
public function setUp() { parent::setUp(); $this->node = $this->rootNode->getNode('tests_general_base'); $this->createdProperty = $this->node->getProperty('jcr:created'); $this->dateProperty = $this->node->getProperty('index.txt/jcr:content/mydateprop'); $this->valProperty = $this->node->getNode('numberPropertyNode/jcr:content')->getProperty('foo'); $this->multiValueProperty = $this->node->getNode('index.txt/jcr:content')->getProperty('multivalue'); }
public static function setupBeforeClass($fixtures = false) { parent::setupBeforeClass($fixtures); $ntm = self::$staticSharedFixture['session']->getWorkspace()->getNodeTypeManager(); self::$base = $ntm->getNodeType('nt:base'); self::$hierarchyNode = $ntm->getNodeType('nt:hierarchyNode'); self::$file = $ntm->getNodeType('nt:file'); self::$resource = $ntm->getNodeType('nt:resource'); self::$created = $ntm->getNodeType('mix:created'); }
public function setUp() { parent::setUp(); $this->sql2 = ' SELECT * FROM [nt:file] INNER JOIN [nt:folder] ON ISSAMENODE(sel1, sel2, [/home])'; $this->tokens = array('SELECT', '*', 'FROM', '[nt:file]', 'INNER', 'JOIN', '[nt:folder]', 'ON', 'ISSAMENODE', '(', 'sel1', ',', 'sel2', ',', '[/home]', ')'); }
public function setUp() { $this->renewSession(); parent::setUp(); //all tests in this suite have a node in the fixtures, but without the dataset in the name $name = $this->getName(); if (false !== ($pos = strpos($this->getName(), ' '))) { $name = substr($name, 0, $pos); } $this->node = $this->rootNode->getNode("tests_write_nodetype/{$name}"); }
/** * in addition to base stuff, prepare $this->query with a simple select query. */ public function setUp() { parent::setUp(); $this->query = $this->sharedFixture['qm']->createQuery(' SELECT * FROM [nt:folder] WHERE ISDESCENDANTNODE([/tests_general_base]) OR ISSAMENODE([/tests_general_base]) ', \PHPCR\Query\QueryInterface::JCR_SQL2); // the query result is not ordered, but these are the nodes that are to be expected in any order $this->resultPaths = array('/tests_general_base', '/tests_general_base/test:namespacedNode', '/tests_general_base/emptyExample', '/tests_general_base/multiValueProperty/deepnode', '/tests_general_base/multiValueProperty'); }
public function setUp() { parent::setUp(); $factory = $this->session->getWorkspace()->getQueryManager()->getQOMFactory(); $this->sql2Queries = Sql2TestQueries::getQueries(); $this->qomQueries = QomTestQueries::getQueries($factory); try { $this->parser = new Sql2ToQomQueryConverter($factory); } catch (\PHPCR\UnsupportedRepositoryOperationException $e) { $this->markTestSkipped('Repository does not support the QOM factory'); } }
public function setUp() { parent::setUp(); if (!$this->session->getWorkspace() instanceof \Jackalope\Workspace) { $this->markTestSkipped('TODO: fix the dependency on jackalope and always use the factory'); } $this->parser = new QomToSql2QueryConverter(new Sql2Generator(new ValueConverter())); try { $this->factory = $this->session->getWorkspace()->getQueryManager()->getQOMFactory(); } catch (\PHPCR\UnsupportedRepositoryOperationException $e) { $this->markTestSkipped('Repository does not support the QOM factory'); } $this->queries = Sql2TestQueries::getQueries(); }
public function setUp() { parent::setUp(); if (!$this->session instanceof \Jackalope\Session) { $this->markTestSkipped('This test is only meant for Jackalope'); //TODO: this is a unit test that belongs into jackalope } $root = $this->session->getRootNode(); if ($root->hasNode('testNode')) { $node = $root->getNode('testNode'); $node->remove(); } if ($root->hasProperty('testProp')) { $prop = $root->getProperty('testProp'); $prop->remove(); } $this->saveAndRenewSession(); }
public function setUp() { parent::setUp(); try { $defs = self::$file->getChildNodeDefinitions(); $this->assertInternalType('array', $defs); $this->assertCount(1, $defs); list($key, $this->content) = each($defs); $this->assertInstanceOf('\\PHPCR\\NodeType\\NodeDefinitionInterface', $this->content); $this->assertEquals('jcr:content', $this->content->getName()); $defs = self::$folder->getChildNodeDefinitions(); $this->assertInternalType('array', $defs); $this->assertCount(1, $defs); list($key, $this->hierarchyNodeDef) = each($defs); $this->assertInstanceOf('\\PHPCR\\NodeType\\NodeDefinitionInterface', $this->hierarchyNodeDef); $this->assertEquals('*', $this->hierarchyNodeDef->getName()); } catch (\Exception $e) { $this->markTestSkipped('getChildNodeDefinitions not working as it should, skipping tests about NodeDefinitionInterface: ' . $e->getMessage()); } }
public function setUp() { parent::setUp(); $this->versioned = $this->session->getNode('/tests_version_base/versioned'); $this->simpleVersioned = $this->session->getNode('/tests_version_base/simpleVersioned'); }
public function setUp() { parent::setUp(false); $this->nodeTypeManager = $this->session->getWorkspace()->getNodeTypeManager(); }
public static function setupBeforeClass($fixtures = null) { //don't care about fixtures parent::setupBeforeClass($fixtures); }
public function setUp() { parent::setUp(); // because of the data provider the signature will not match $this->node = $this->rootNode->getNode('tests_read_encoding')->getNode('testEncoding'); }
public static function setupBeforeClass($fixtures = '06_Query/characters') { parent::setupBeforeClass($fixtures); self::$staticSharedFixture['qm'] = self::$staticSharedFixture['session']->getWorkspace()->getQueryManager(); }
public static function setupBeforeClass($fixtures = '10_Writing/mixinreferenceable') { parent::setupBeforeClass($fixtures); }