Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions tests/10_Writing/DeleteMethodsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,12 @@ public function testRemoveNodeParentState()
*/
public function testRemoveNodeFromBackend()
{
$node = $this->rootNode->addNode('toBeDeleted', 'nt:unstructured');
$this->sharedFixture['session']->save();

$this->renewSession();
$nodename = 'toBeDeleted';
if (! $this->rootNode->hasNode($nodename)) {
$this->rootNode->addNode($nodename, 'nt:unstructured');
$this->sharedFixture['session']->save();
$this->renewSession();
}

$node = $this->sharedFixture['session']->getNode('/toBeDeleted');

Expand All @@ -160,7 +162,6 @@ public function testRemoveNodeFromBackend()

$this->setExpectedException('\PHPCR\PathNotFoundException');
$this->sharedFixture['session']->getNode('/toBeDeleted');

}

/**
Expand Down
5 changes: 3 additions & 2 deletions tests/12_Observation/ObservationManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ public function testFilteredEventJournalNodeType()

// Make the root node have a UUID
$root = $session->getRootNode();
$root->addNode('unstructured');
$node = $root->addNode('/tests_observation');
$node->addNode('unstructured');
$session->save();

// At this point the journal contains 3 events: PROP_ADDED (for setting the node type of the new node)
Expand All @@ -120,7 +121,7 @@ public function testFilteredEventJournalNodeType()

// At this point the journal
$this->assertTrue($journal->valid());
$this->assertEquals('/unstructured', $journal->current()->getPath());
$this->assertEquals('/tests_observation/unstructured', $journal->current()->getPath());
$this->assertEquals(EventInterface::NODE_ADDED, $journal->current()->getType());

$journal->next();
Expand Down
5 changes: 5 additions & 0 deletions tests/PhpcrUtils/PurgeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ protected function setUp()
}
parent::setUp();
}

public function testPurge()
{
/** @var $session \PHPCR\SessionInterface */
Expand All @@ -40,6 +41,10 @@ public function testPurge()
$session->save();

NodeHelper::purgeWorkspace($session);
if ($session->getWorkspace()->getName() == 'crx.default') {
// if we would continue, we would delete all content from the only real workspace
$this->markTestIncomplete('TODO: how to test this with crx where we have no workspaces?');
}
$session->save();

// if there where system nodes, they should still be here
Expand Down