File tree Expand file tree Collapse file tree 2 files changed +14
-11
lines changed Expand file tree Collapse file tree 2 files changed +14
-11
lines changed Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
- <phpunit bootstrap =" tests/bootstrap.php" >
2
+ <phpunit bootstrap =" tests/bootstrap.php"
3
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
+ xsi : noNamespaceSchemaLocation =" vendor/phpunit/phpunit/phpunit.xsd"
5
+ convertNoticesToExceptions =" true"
6
+ convertWarningsToExceptions =" true"
7
+ convertErrorsToExceptions =" true"
8
+ convertDeprecationsToExceptions =" true"
9
+ >>
3
10
<!-- Test Suite Configuration -->
4
11
<testsuites >
5
12
<testsuite name =" Application Test Suite" >
Original file line number Diff line number Diff line change 2
2
3
3
namespace Neo4j \QueryAPI \Tests \Integration ;
4
4
5
+ use Neo4j \QueryAPI \Objects \Path ;
5
6
use Neo4j \QueryAPI \OGM ;
6
7
use PHPUnit \Framework \TestCase ;
7
8
8
- /**
9
- * @api
10
- */
11
- class Neo4jOGMTest extends TestCase
9
+ final class Neo4jOGMTest extends TestCase
12
10
{
13
- /** @psalm-suppress PropertyNotSetInConstructor */
14
11
private OGM $ ogm ;
15
12
16
13
#[\Override]
@@ -84,12 +81,11 @@ public function testWithPath(): void
84
81
];
85
82
86
83
$ path = $ this ->ogm ->map ($ pathData );
87
- $ nodes = iterator_to_array ( $ path-> nodes );
84
+ $ this -> assertInstanceOf (Path::class, $ path );
88
85
89
- $ this ->assertCount (2 , $ nodes );
86
+ $ this ->assertCount (2 , $ path -> nodes );
90
87
$ this ->assertCount (1 , $ path ->relationships );
91
- $ this ->assertEquals ('A ' , $ nodes [0 ]->getProperties ()['name ' ]['_value ' ]);
92
- $ this ->assertEquals ('B ' , $ nodes [1 ]->getProperties ()['name ' ]['_value ' ]);
88
+ $ this ->assertEquals ('A ' , $ path -> nodes [0 ]->getProperties ()['name ' ]['_value ' ]);
89
+ $ this ->assertEquals ('B ' , $ path -> nodes [1 ]->getProperties ()['name ' ]['_value ' ]);
93
90
}
94
-
95
91
}
You can’t perform that action at this time.
0 commit comments