Skip to content

Commit 1624dc3

Browse files
stefanak-michaltransistive
authored andcommitted
simplified test
1 parent c4539d0 commit 1624dc3

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

tests/Integration/ClientIntegrationTest.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,9 @@ public function testValidStatement(): void
131131

132132
public function testInvalidStatement(): void
133133
{
134-
$exception = false;
135-
try {
136-
$statement = Statement::create('MERGE (x:Tes0342hdm21.())', ['test' => 'a', 'otherTest' => 'b']);
137-
$this->getSession()->transaction(static fn (TransactionInterface $tsx) => $tsx->runStatement($statement));
138-
} catch (Neo4jException) {
139-
$exception = true;
140-
}
141-
self::assertTrue($exception);
134+
$this->expectException(Neo4jException::class);
135+
$statement = Statement::create('MERGE (x:Tes0342hdm21.())', ['test' => 'a', 'otherTest' => 'b']);
136+
$this->getSession()->transaction(static fn (TransactionInterface $tsx) => $tsx->runStatement($statement));
142137
}
143138

144139
public function testStatements(): void

0 commit comments

Comments
 (0)