File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,26 @@ public function testQueryField()
47
47
$ this ->assertEquals (array ('bar ' ), $ vals );
48
48
}
49
49
50
+ public function testQueryFieldDate ()
51
+ {
52
+ /** @var $query QueryInterface */
53
+ $ query = $ this ->sharedFixture ['qm ' ]->createQuery ("
54
+ SELECT *
55
+ FROM [nt:base]
56
+ WHERE [mydateprop] <= CAST('2011-04-27T13:01:07.472+02:00' AS DATE)
57
+ AND [mydateprop] >= CAST('2011-04-01T13:01:07.472+02:00' AS DATE)
58
+ AND (ISSAMENODE([/tests_general_base]) OR ISDESCENDANTNODE([/tests_general_base]))
59
+ " ,
60
+ QueryInterface::JCR_SQL2
61
+ );
62
+
63
+ $ result = $ query ->execute ();
64
+ $ this ->assertCount (1 , $ result ->getRows ());
65
+ /** @var RowInterface $row */
66
+ $ row = $ result ->getRows ()->current ();
67
+ $ this ->assertEquals ('/tests_general_base/index.txt/jcr:content ' , $ row ->getPath ());
68
+ }
69
+
50
70
public function testQueryFieldSomeNull ()
51
71
{
52
72
/** @var $query QueryInterface */
You can’t perform that action at this time.
0 commit comments