11
11
12
12
use PHPUnit \Framework \TestCase ;
13
13
use WikibaseSolutions \CypherDSL \Clauses \UnionClause ;
14
- use WikibaseSolutions \CypherDSL \Query ;
15
14
16
15
/**
17
16
* @covers \WikibaseSolutions\CypherDSL\Clauses\UnionClause
@@ -33,32 +32,6 @@ public function testAll(): void
33
32
$ this ->assertEquals ('UNION ALL ' , $ union ->toQuery ());
34
33
}
35
34
36
- public function testUnionFactory (): void
37
- {
38
- $ nodeX = Query::node ('X ' )->withVariable ('x ' );
39
- $ nodeY = Query::node ('Y ' )->withVariable ('y ' );
40
-
41
- $ left = Query::new ()->match ($ nodeX )->returning ($ nodeX ->getVariable ());
42
- $ right = Query::new ()->match ($ nodeY )->returning ($ nodeY ->getVariable ());
43
-
44
- $ query = UnionClause::union ($ left , $ right );
45
-
46
- $ this ->assertEquals ('MATCH (x:X) RETURN x UNION MATCH (y:Y) RETURN y ' , $ query ->toQuery ());
47
- }
48
-
49
- public function testUnionFactoryAll (): void
50
- {
51
- $ nodeX = Query::node ('X ' )->withVariable ('x ' );
52
- $ nodeY = Query::node ('Y ' )->withVariable ('y ' );
53
-
54
- $ left = Query::new ()->match ($ nodeX )->returning ($ nodeX ->getVariable ());
55
- $ right = Query::new ()->match ($ nodeY )->returning ($ nodeY ->getVariable ());
56
-
57
- $ query = UnionClause::union ($ left , $ right , true );
58
-
59
- $ this ->assertEquals ('MATCH (x:X) RETURN x UNION ALL MATCH (y:Y) RETURN y ' , $ query ->toQuery ());
60
- }
61
-
62
35
public function testSetAllDefaultIsTrue (): void
63
36
{
64
37
$ union = new UnionClause ();
0 commit comments