Skip to content

Commit e700d3d

Browse files
committed
fix test preparations for observation
1 parent 9779c6e commit e700d3d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/12_Observation/ObservationManagerTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,15 @@ public function testFilteredEventJournalUuid()
9999

100100
public function testFilteredEventJournalNodeType()
101101
{
102+
$session = self::$loader->getSession();
103+
$root = $session->getRootNode();
104+
$node = $root->addNode('/tests_observation');
105+
$session->save();
102106
sleep(1); // To avoid having the same date as the journal entries generated by the fixtures loading or other tests
103107

104108
$curTime = strtotime('now');
105-
$session = self::$loader->getSession();
106109
$om = $session->getWorkspace()->getObservationManager();
107110

108-
// Make the root node have a UUID
109-
$root = $session->getRootNode();
110-
$node = $root->addNode('/tests_observation');
111111
$node->addNode('unstructured');
112112
$session->save();
113113

@@ -119,7 +119,7 @@ public function testFilteredEventJournalNodeType()
119119
$journal = $om->getEventJournal($filter);
120120
$journal->skipTo($curTime);
121121

122-
// At this point the journal
122+
// At this point the journal should only contain the NODE_ADDED event
123123
$this->assertTrue($journal->valid());
124124
$this->assertEquals('/tests_observation/unstructured', $journal->current()->getPath());
125125
$this->assertEquals(EventInterface::NODE_ADDED, $journal->current()->getType());

0 commit comments

Comments
 (0)