1
1
<?php
2
2
3
- namespace Neo4j \QueryAPI \Tests \Unit \ srcfiles ;
3
+ namespace Neo4j \QueryAPI \Tests \Unit ;
4
4
5
- use Neo4j \ QueryAPI \ OGM ;
5
+ use InvalidArgumentException ;
6
6
use Neo4j \QueryAPI \Objects \Node ;
7
- use Neo4j \QueryAPI \Objects \Relationship ;
8
7
use Neo4j \QueryAPI \Objects \Point ;
8
+ use Neo4j \QueryAPI \Objects \Relationship ;
9
+ use Neo4j \QueryAPI \OGM ;
9
10
use PHPUnit \Framework \TestCase ;
10
- use InvalidArgumentException ;
11
11
12
12
/**
13
13
* @api
@@ -28,37 +28,37 @@ public function testMapInteger(): void
28
28
$ this ->assertSame (42 , $ this ->ogm ->map ($ data ));
29
29
}
30
30
31
- public function testMapFloat ()
31
+ public function testMapFloat (): void
32
32
{
33
33
$ data = ['$type ' => 'Float ' , '_value ' => 3.14 ];
34
34
$ this ->assertSame (3.14 , $ this ->ogm ->map ($ data ));
35
35
}
36
36
37
- public function testMapString ()
37
+ public function testMapString (): void
38
38
{
39
39
$ data = ['$type ' => 'String ' , '_value ' => 'hello ' ];
40
40
$ this ->assertSame ('hello ' , $ this ->ogm ->map ($ data ));
41
41
}
42
42
43
- public function testMapBoolean ()
43
+ public function testMapBoolean (): void
44
44
{
45
45
$ data = ['$type ' => 'Boolean ' , '_value ' => true ];
46
46
$ this ->assertTrue ($ this ->ogm ->map ($ data ));
47
47
}
48
48
49
- public function testMapNull ()
49
+ public function testMapNull (): void
50
50
{
51
51
$ data = ['$type ' => 'Null ' , '_value ' => null ];
52
52
$ this ->assertNull ($ this ->ogm ->map ($ data ));
53
53
}
54
54
55
- public function testMapArray ()
55
+ public function testMapArray (): void
56
56
{
57
57
$ data = ['$type ' => 'List ' , '_value ' => [['$type ' => 'Integer ' , '_value ' => 1 ], ['$type ' => 'Integer ' , '_value ' => 2 ]]];
58
58
$ this ->assertSame ([1 , 2 ], $ this ->ogm ->map ($ data ));
59
59
}
60
60
61
- public function testMapNode ()
61
+ public function testMapNode (): void
62
62
{
63
63
$ data = [
64
64
'$type ' => 'Node ' ,
@@ -71,7 +71,7 @@ public function testMapNode()
71
71
$ this ->assertSame (['name ' => 'Alice ' ], $ result ->getProperties ());
72
72
}
73
73
74
- public function testMapRelationship ()
74
+ public function testMapRelationship (): void
75
75
{
76
76
$ data = [
77
77
'$type ' => 'Relationship ' ,
@@ -95,7 +95,7 @@ public function testMapPoint(): void
95
95
$ this ->assertSame (4326 , $ result ->getSrid ());
96
96
}
97
97
98
- public function testParseWKT ()
98
+ public function testParseWKT (): void
99
99
{
100
100
$ wkt = 'SRID=4326;POINT (10 20 30) ' ;
101
101
$ result = OGM ::parseWKT ($ wkt );
@@ -107,13 +107,13 @@ public function testParseWKT()
107
107
$ this ->assertSame (4326 , $ result ->getSrid ());
108
108
}
109
109
110
- public function testInvalidWKTThrowsException ()
110
+ public function testInvalidWKTThrowsException (): void
111
111
{
112
112
$ this ->expectException (InvalidArgumentException::class);
113
113
OGM ::parseWKT ('Invalid WKT String ' );
114
114
}
115
115
116
- public function testInvalidPointFormatThrowsException ()
116
+ public function testInvalidPointFormatThrowsException (): void
117
117
{
118
118
$ this ->expectException (InvalidArgumentException::class);
119
119
$ this ->ogm ->map (['$type ' => 'Point ' , '_value ' => 'Invalid Point Format ' ]);
0 commit comments