Skip to content

Commit eefc119

Browse files
dantleechlsmith77
authored andcommitted
[WIP] Added test for DateTime objectrs in QOM query
Not really sure how this works. ..
1 parent 2aeb5e1 commit eefc119

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/06_Query/QOM/QomTestQueries.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,17 @@ public static function getQueries(\PHPCR\Query\QOM\QueryObjectModelFactoryInterf
402402
array(),
403403
array());
404404

405+
// SELECT * FROM nt:unstructured WHERE sel.prop > '2013-04-15'
406+
$queries['6.7.27.1.PropertyValue'] =
407+
$factory->createQuery(
408+
$factory->selector('nt:unstructured'),
409+
$factory->comparison(
410+
$factory->propertyValue('prop', 'sel'),
411+
Constants::JCR_OPERATOR_GREATER_THAN,
412+
$factory->literal(new \DateTime('2013-04-15'))),
413+
array(),
414+
array());
415+
405416
/**
406417
* 6.7.28. Length
407418
*/

0 commit comments

Comments
 (0)