GraphAware\Neo4j\Client\Tests\Integration\TransactionIntegrationTest::testTransactionIsRolledBackInCaseOfExceptionWithBolt PHP Méthode

testTransactionIsRolledBackInCaseOfExceptionWithBolt() public méthode

    public function testTransactionIsRolledBackInCaseOfExceptionWithBolt()
    {
        $this->emptyDb();
        $tx = $this->client->transaction('bolt');
        try {
            $result = $tx->run('CREATE (n:Test) RETURN x');
            $this->assertEquals(1, 2);
            // If we reached here then there is a bug
        } catch (MessageFailureException $e) {
            $this->assertEquals(1, 1);
        }
        //$this->assertEquals(Transaction::ROLLED_BACK, $tx->status());
        $this->assertXNodesWithLabelExist('Test', 0);
    }