File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 3
3
namespace Neo4j \Neo4jBundle \Tests \App \Controller ;
4
4
5
5
use Laudis \Neo4j \Contracts \ClientInterface ;
6
- use Laudis \Neo4j \Neo4j \Neo4jDriver ;
7
- use Neo4j \Neo4jBundle \SymfonyClient ;
8
6
use Symfony \Bundle \FrameworkBundle \Controller \AbstractController ;
9
7
use Symfony \Component \HttpFoundation \Response ;
10
8
use Symfony \Component \Routing \Attribute \Route ;
@@ -16,11 +14,12 @@ public function __construct(
16
14
) {
17
15
}
18
16
19
- #[Route(" / " , methods: [" GET " ])]
17
+ #[Route(' / ' , methods: [' GET ' ])]
20
18
public function index (): Response
21
19
{
22
20
$ this ->client ->run ('MATCH (n) RETURN n ' );
23
21
$ this ->client ->run ('MATCH (n) RETURN n ' );
22
+
24
23
return $ this ->render ('index.twig.html ' );
25
24
}
26
- }
25
+ }
Original file line number Diff line number Diff line change 2
2
3
3
namespace Functional ;
4
4
5
+ use Neo4j \Neo4jBundle \Collector \Neo4jDataCollector ;
5
6
use Neo4j \Neo4jBundle \Tests \App \TestKernel ;
6
7
use Symfony \Bundle \FrameworkBundle \Test \WebTestCase ;
7
8
@@ -21,10 +22,12 @@ public function testProfiler()
21
22
22
23
$ this ->assertResponseIsSuccessful ();
23
24
if ($ profile = $ client ->getProfile ()) {
25
+ /** @var Neo4jDataCollector $collector */
26
+ $ collector = $ profile ->getCollector ('neo4j ' );
24
27
$ this ->assertEquals (
25
28
2 ,
26
- $ profile -> getCollector ( ' neo4j ' ) ->getQueryCount ()
29
+ $ collector ->getQueryCount ()
27
30
);
28
31
}
29
32
}
30
- }
33
+ }
You can’t perform that action at this time.
0 commit comments