1919use PHPCR \Query \QOM \PropertyValueInterface ;
2020use PHPCR \Query \QOM \QueryObjectModelConstantsInterface ;
2121use PHPCR \Query \QOM \QueryObjectModelFactoryInterface ;
22- use PHPCR \Query \QOM \SourceInterface ;
22+ use PHPCR \Query \QOM \SelectorInterface ;
2323use PHPCR \Query \QueryInterface ;
2424use PhpSpec \ObjectBehavior ;
2525
@@ -42,17 +42,17 @@ public function it_should_provide_a_qom_object_for_selecting(
4242 QueryObjectModelFactoryInterface $ qomf ,
4343 ChildNodeJoinConditionInterface $ joinCondition ,
4444 JoinInterface $ join ,
45- SourceInterface $ parentSource ,
46- SourceInterface $ childSource ,
45+ SelectorInterface $ parentSelector ,
46+ SelectorInterface $ childSelector ,
4747 PropertyValueInterface $ childValue ,
4848 LiteralInterface $ literalValue ,
4949 ComparisonInterface $ comparison ,
5050 QueryInterface $ query
5151 ) {
52- $ qomf ->selector ('parent ' , 'mgnl:page ' )->willReturn ($ parentSource );
53- $ qomf ->selector ('child ' , 'mgnl:metaData ' )->willReturn ($ childSource );
52+ $ qomf ->selector ('parent ' , 'mgnl:page ' )->willReturn ($ parentSelector );
53+ $ qomf ->selector ('child ' , 'mgnl:metaData ' )->willReturn ($ childSelector );
5454 $ qomf ->childNodeJoinCondition ('child ' , 'parent ' )->willReturn ($ joinCondition );
55- $ qomf ->join ($ parentSource , $ childSource , QueryObjectModelConstantsInterface::JCR_JOIN_TYPE_INNER , $ joinCondition )->willReturn ($ join );
55+ $ qomf ->join ($ parentSelector , $ childSelector , QueryObjectModelConstantsInterface::JCR_JOIN_TYPE_INNER , $ joinCondition )->willReturn ($ join );
5656 $ qomf ->propertyValue ('child ' , 'mgnl:template ' )->willReturn ($ childValue );
5757 $ qomf ->literal ('standard-templating-kit:stkNews ' )->willReturn ($ literalValue );
5858 $ qomf ->comparison ($ childValue , QueryObjectModelConstantsInterface::JCR_OPERATOR_EQUAL_TO , $ literalValue )->willReturn ($ comparison );
@@ -68,9 +68,9 @@ public function it_should_provide_a_qom_object_for_selecting(
6868 WHERE
6969 child.[mgnl:template] = 'standard-templating-kit:stkNews'
7070EOT;
71- $ res = $ this ->parse ($ sql );
71+ $ res = $ this ->parseUpdate ($ sql );
7272
73- $ res ->offsetGet (0 )->shouldHaveType (' PHPCR\Query\ QueryInterface' );
73+ $ res ->offsetGet (0 )->shouldHaveType (QueryInterface::class );
7474 $ res ->offsetGet (1 )->shouldReturn ([
7575 [
7676 'selector ' => 'parent ' ,
@@ -87,7 +87,7 @@ public function it_should_provide_a_qom_object_for_selecting(
8787
8888 public function it_should_parse_functions (
8989 QueryObjectModelFactoryInterface $ qomf ,
90- SourceInterface $ source ,
90+ SelectorInterface $ source ,
9191 QueryInterface $ query
9292 ) {
9393 $ qomf ->selector ('a ' , 'dtl:article ' )->willReturn ($ source );
@@ -96,14 +96,14 @@ public function it_should_parse_functions(
9696 $ sql = <<<'EOT'
9797UPDATE [dtl:article] AS a SET a.tags = array_replace(a.tags, 'asd', 'dsa')
9898EOT;
99- $ res = $ this ->parse ($ sql );
99+ $ res = $ this ->parseUpdate ($ sql );
100100
101101 $ res ->offsetGet (0 )->shouldHaveType ('PHPCR\Query\QueryInterface ' );
102102 }
103103
104104 public function it_should_parse_apply (
105105 QueryObjectModelFactoryInterface $ qomf ,
106- SourceInterface $ source ,
106+ SelectorInterface $ source ,
107107 QueryInterface $ query
108108 ) {
109109 $ qomf ->selector ('a ' , 'dtl:article ' )->willReturn ($ source );
@@ -112,7 +112,7 @@ public function it_should_parse_apply(
112112 $ sql = <<<'EOT'
113113UPDATE [dtl:article] AS a APPLY nodetype_add('nt:barbar')
114114EOT;
115- $ res = $ this ->parse ($ sql );
115+ $ res = $ this ->parseUpdate ($ sql );
116116
117117 $ res ->offsetGet (0 )->shouldHaveType ('PHPCR\Query\QueryInterface ' );
118118 }
0 commit comments