File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,26 @@ public function testQueryField()
4747 $ this ->assertEquals (array ('bar ' ), $ vals );
4848 }
4949
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+
5070 public function testQueryFieldSomeNull ()
5171 {
5272 /** @var $query QueryInterface */
You can’t perform that action at this time.
0 commit comments