Skip to content

Commit 9959589

Browse files
author
Willem-Jan Zijderveld
committed
Changed the left/right join tests.
It seems JCR isn't supposed to to return node name in a query result. Changed it to the basename() of the path.
1 parent 4d06e56 commit 9959589

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/06_Query/QuerySql2OperationsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function testQueryLeftJoin()
131131
$this->assertInstanceOf('\PHPCR\Query\QueryResultInterface', $result);
132132
$vals = array();
133133
foreach ($result->getRows() as $row) {
134-
$vals[$row->getValue('file.jcr:name')] = $row->getValue('target.longNumberToCompare');
134+
$vals[basename($row->getPath('file'))] = $row->getValue('target.longNumberToCompare');
135135
}
136136

137137
// We get 9 results (idExample comes back multiple times because of the join)
@@ -162,7 +162,7 @@ public function testQueryRightJoin()
162162
$this->assertInstanceOf('\PHPCR\Query\QueryResultInterface', $result);
163163
$vals = array();
164164
foreach ($result->getRows() as $row) {
165-
$vals[$row->getValue('file.jcr:name')] = $row->getValue('target.stringToCompare');
165+
$vals[basename($row->getPath('file'))] = $row->getValue('target.stringToCompare');
166166
}
167167

168168
// We get 9 results (idExample comes back multiple times because of the join)

0 commit comments

Comments
 (0)