From 1d1951faebb20d95cd41fe6dc1b6a3a0eb67a480 Mon Sep 17 00:00:00 2001 From: Pratiksha Date: Wed, 12 Feb 2025 17:49:16 +0530 Subject: [PATCH 1/2] DEBUG --- .php-cs-fixer.cache | 2 +- .../Neo4jTransactionIntegrationTest.php | 54 +++++++++- tests/Unit/TransactionUnitTest.php | 101 ++++++++++++++++++ 3 files changed, 155 insertions(+), 2 deletions(-) create mode 100644 tests/Unit/TransactionUnitTest.php diff --git a/.php-cs-fixer.cache b/.php-cs-fixer.cache index 444ba97f..24adac01 100644 --- a/.php-cs-fixer.cache +++ b/.php-cs-fixer.cache @@ -1 +1 @@ -{"php":"8.3.16","version":"3.68.5:v3.68.5#7bedb718b633355272428c60736dc97fb96daf27","indent":" ","lineEnding":"\n","rules":{"binary_operator_spaces":{"default":"at_least_single_space"},"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"braces_position":{"allow_single_line_empty_anonymous_classes":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_type_declaration":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_parentheses":true,"no_blank_lines_after_class_opening":true,"no_extra_blank_lines":{"tokens":["use"]},"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"none"},"return_type_declaration":true,"short_scalar_cast":true,"single_import_per_statement":{"group_to_single_imports":false},"single_space_around_construct":{"constructs_followed_by_a_single_space":["abstract","as","case","catch","class","const_import","do","else","elseif","final","finally","for","foreach","function","function_import","if","insteadof","interface","namespace","new","private","protected","public","static","switch","trait","try","use","use_lambda","while"],"constructs_preceded_by_a_single_space":["as","else","elseif","use_lambda"]},"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"unary_operator_spaces":{"only_dec_inc":true},"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"attribute_placement":"ignore","on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_line_after_imports":true,"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"strict_param":true},"hashes":{"tests\/resources\/expected\/complex-query-profile.php":"c0d16588e70d32588ec2e55ba5ae5873","tests\/Unit\/Neo4jExceptionUnitTest.php":"e07e604496e0e4032d2798ee9d2cb1b2","tests\/Unit\/ResultRowTest.php":"b4b307579a75da8307d6d65eb5548cae","tests\/Unit\/Neo4jQueryAPIUnitTest.php":"87e08aca0ccef5589c88bd7249e39496","tests\/Unit\/Neo4jRequestFactoryTest.php":"ebc6d5ee7790df4d69a5b555ad48ff5a","tests\/Unit\/AuthenticationTest.php":"746b185bcfb47a925e35b5b79b854fab","tests\/Integration\/Neo4jQueryAPIIntegrationTest.php":"43f34ad1774e3eeb133a9e3bb96f191d","tests\/Integration\/Neo4jTransactionIntegrationTest.php":"35fcbd5afbec5bb59f35040d9d6c518f","tests\/Integration\/Neo4jOGMTest.php":"e03f51ef605ca818763f3897d7a30830","src\/OGM.php":"211c087b78fca69390701e2f505e46fe","src\/Neo4jQueryAPI.php":"a7a505057617a2de3a94a73065254ecb","src\/BearerAuthentication.php":"51b5f02280a43838465cffa8974648c6","src\/Enums\/AccessMode.php":"88b5c70c4716cc68bcb86e2f162dd347","src\/Results\/ResultRow.php":"92dc1ec9315fa5236a79468ffaf9a60c","src\/Results\/ResultSet.php":"372faa2af185b25b804be1974c34b1ae","src\/Exception\/Neo4jException.php":"89c4c090cd3ba6e94c13eab7ebd0588c","src\/NoAuth.php":"2267e8a5b07aeaaab3165bb105b10807","src\/loginConfig.php":"47e9993051fc556a7fc28bc8f9a01caa","src\/AuthenticateInterface.php":"1da849c5d5b88439e01543d5d5b9f8d9","src\/BasicAuthentication.php":"ab50275cc6841d88d289a63d86ecb118","src\/Configuration.php":"fabfe6acf58bb0bda76453ace4f0757d","src\/ResponseParser.php":"e32270966c3a618bcb5ea9c6497748be","src\/Neo4jRequestFactory.php":"e3279d36e54032c6acf92df10ac47f07","src\/Objects\/Path.php":"e8091a19eb4e70ced4f8f7364dbe78be","src\/Objects\/Node.php":"ac679671f513c6c996dbf75a66fcacb2","src\/Objects\/Authentication.php":"f31af1c057be0f490cc2dba365f03b31","src\/Objects\/ProfiledQueryPlanArguments.php":"02b5fa2d50fec5d0fb0c4ada55ebda69","src\/Objects\/Person.php":"cee5594450a015103e12d4cbe186f167","src\/Objects\/Point.php":"4115d8d1b85a0d6e37b79d303237bcd0","src\/Objects\/ResultSet.php":"a5ba56fc6c6e250c22b183ac26dfd68e","src\/Objects\/ProfiledQueryPlan.php":"75ab6c3ad2ce97675a8e6478d17ac4d9","src\/Objects\/Bookmarks.php":"2c3e7229ce9b56c0352155b3feaac9bb","src\/Objects\/ResultCounters.php":"a9372c98fe7bede10cb004af30ea502f","src\/Objects\/Relationship.php":"e344e22d5a41f1795f3310d55ea51c20","src\/Transaction.php":"ff5454897ddbcc4fc2a984ecb90a90fd","src\/Authentication\/BearerAuthentication.php":"08a9e3c01d3833255cd51c94a17f1aa3","src\/Authentication\/NoAuth.php":"71cc7d784b9d98c62d2342faf38f7dc4","src\/Authentication\/AuthenticateInterface.php":"65b5a1074e11fba04362e754ad97023f","src\/Authentication\/BasicAuthentication.php":"c37b7ef26a59c032ac2a6a7b91c5adae"}} \ No newline at end of file +{"php":"8.3.16","version":"3.68.5:v3.68.5#7bedb718b633355272428c60736dc97fb96daf27","indent":" ","lineEnding":"\n","rules":{"binary_operator_spaces":{"default":"at_least_single_space"},"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"braces_position":{"allow_single_line_empty_anonymous_classes":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_type_declaration":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_parentheses":true,"no_blank_lines_after_class_opening":true,"no_extra_blank_lines":{"tokens":["use"]},"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"none"},"return_type_declaration":true,"short_scalar_cast":true,"single_import_per_statement":{"group_to_single_imports":false},"single_space_around_construct":{"constructs_followed_by_a_single_space":["abstract","as","case","catch","class","const_import","do","else","elseif","final","finally","for","foreach","function","function_import","if","insteadof","interface","namespace","new","private","protected","public","static","switch","trait","try","use","use_lambda","while"],"constructs_preceded_by_a_single_space":["as","else","elseif","use_lambda"]},"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"unary_operator_spaces":{"only_dec_inc":true},"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"attribute_placement":"ignore","on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_line_after_imports":true,"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"strict_param":true},"hashes":{"tests\/resources\/expected\/complex-query-profile.php":"c0d16588e70d32588ec2e55ba5ae5873","tests\/Unit\/Neo4jExceptionUnitTest.php":"e07e604496e0e4032d2798ee9d2cb1b2","tests\/Unit\/ResultRowTest.php":"b4b307579a75da8307d6d65eb5548cae","tests\/Unit\/Neo4jQueryAPIUnitTest.php":"87e08aca0ccef5589c88bd7249e39496","tests\/Unit\/Neo4jRequestFactoryTest.php":"ebc6d5ee7790df4d69a5b555ad48ff5a","tests\/Unit\/AuthenticationTest.php":"746b185bcfb47a925e35b5b79b854fab","tests\/Integration\/Neo4jOGMTest.php":"e03f51ef605ca818763f3897d7a30830","src\/OGM.php":"211c087b78fca69390701e2f505e46fe","src\/Neo4jQueryAPI.php":"a7a505057617a2de3a94a73065254ecb","src\/BearerAuthentication.php":"51b5f02280a43838465cffa8974648c6","src\/Enums\/AccessMode.php":"88b5c70c4716cc68bcb86e2f162dd347","src\/Results\/ResultRow.php":"92dc1ec9315fa5236a79468ffaf9a60c","src\/Results\/ResultSet.php":"372faa2af185b25b804be1974c34b1ae","src\/Exception\/Neo4jException.php":"89c4c090cd3ba6e94c13eab7ebd0588c","src\/NoAuth.php":"2267e8a5b07aeaaab3165bb105b10807","src\/loginConfig.php":"47e9993051fc556a7fc28bc8f9a01caa","src\/AuthenticateInterface.php":"1da849c5d5b88439e01543d5d5b9f8d9","src\/BasicAuthentication.php":"ab50275cc6841d88d289a63d86ecb118","src\/Configuration.php":"fabfe6acf58bb0bda76453ace4f0757d","src\/ResponseParser.php":"e32270966c3a618bcb5ea9c6497748be","src\/Neo4jRequestFactory.php":"e3279d36e54032c6acf92df10ac47f07","src\/Objects\/Path.php":"e8091a19eb4e70ced4f8f7364dbe78be","src\/Objects\/Node.php":"ac679671f513c6c996dbf75a66fcacb2","src\/Objects\/Authentication.php":"f31af1c057be0f490cc2dba365f03b31","src\/Objects\/ProfiledQueryPlanArguments.php":"02b5fa2d50fec5d0fb0c4ada55ebda69","src\/Objects\/Person.php":"cee5594450a015103e12d4cbe186f167","src\/Objects\/Point.php":"4115d8d1b85a0d6e37b79d303237bcd0","src\/Objects\/ResultSet.php":"a5ba56fc6c6e250c22b183ac26dfd68e","src\/Objects\/ProfiledQueryPlan.php":"75ab6c3ad2ce97675a8e6478d17ac4d9","src\/Objects\/Bookmarks.php":"2c3e7229ce9b56c0352155b3feaac9bb","src\/Objects\/ResultCounters.php":"a9372c98fe7bede10cb004af30ea502f","src\/Objects\/Relationship.php":"e344e22d5a41f1795f3310d55ea51c20","src\/Transaction.php":"ff5454897ddbcc4fc2a984ecb90a90fd","src\/Authentication\/BearerAuthentication.php":"08a9e3c01d3833255cd51c94a17f1aa3","src\/Authentication\/NoAuth.php":"71cc7d784b9d98c62d2342faf38f7dc4","src\/Authentication\/AuthenticateInterface.php":"65b5a1074e11fba04362e754ad97023f","src\/Authentication\/BasicAuthentication.php":"c37b7ef26a59c032ac2a6a7b91c5adae","tests\/Unit\/TransactionUnitTest.php":"e6c97ac9afb0b948ac8216baabfc9e22","tests\/Integration\/Neo4jQueryAPIIntegrationTest.php":"3dc17347951ae97e0131e0793f8f90e5","tests\/Integration\/Neo4jTransactionIntegrationTest.php":"d3a4350d427634b229daeca751d8bf47"}} \ No newline at end of file diff --git a/tests/Integration/Neo4jTransactionIntegrationTest.php b/tests/Integration/Neo4jTransactionIntegrationTest.php index 79994cd6..fbaf8c1c 100644 --- a/tests/Integration/Neo4jTransactionIntegrationTest.php +++ b/tests/Integration/Neo4jTransactionIntegrationTest.php @@ -9,7 +9,7 @@ use PHPUnit\Framework\TestCase; /** - * @api + * @api */ class Neo4jTransactionIntegrationTest extends TestCase { @@ -54,6 +54,7 @@ private function populateTestData(): void $this->api->run('CREATE (:Person {name: $name})', ['name' => $name]); } } + public function testTransactionCommit(): void { @@ -75,4 +76,55 @@ public function testTransactionCommit(): void $this->assertCount(1, $results); // Updated to expect 1 result } + public function testTransactionRollback(): void + { + $tsx = $this->api->beginTransaction(); + + $name = 'rollback_' . mt_rand(1, 100000); + $tsx->run("CREATE (x:Human {name: \$name})", ['name' => $name]); + $results = $tsx->run("MATCH (x:Human {name: \$name}) RETURN x", ['name' => $name]); + $this->assertCount(1, $results); + + $tsx->rollback(); + + // Ensure the node is not in the database + $results = $this->api->run("MATCH (x:Human {name: \$name}) RETURN x", ['name' => $name]); + $this->assertCount(0, $results); + } + + public function testCreateNodeAndCommit(): void + { + $tsx = $this->api->beginTransaction(); + + $name = 'committed_' . mt_rand(1, 100000); + $tsx->run("CREATE (x:Person {name: \$name})", ['name' => $name]); + + $results = $this->api->run("MATCH (x:Person {name: \$name}) RETURN x", ['name' => $name]); + $this->assertCount(0, $results); + + $tsx->commit(); + $results = $this->api->run("MATCH (x:Person {name: \$name}) RETURN x", ['name' => $name]); + $this->assertCount(1, $results); + } + + public function testCreateNodeAndRollback(): void + { + $tsx = $this->api->beginTransaction(); + + $name = 'rollback_' . mt_rand(1, 100000); + $tsx->run("CREATE (x:Person {name: \$name})", ['name' => $name]); + + $results = $tsx->run("MATCH (x:Person {name: \$name}) RETURN x", ['name' => $name]); + $this->assertCount(1, $results); + + $results = $this->api->run("MATCH (x:Person {name: \$name}) RETURN x", ['name' => $name]); + $this->assertCount(0, $results); + + $tsx->rollback(); + $results = $this->api->run("MATCH (x:Person {name: \$name}) RETURN x", ['name' => $name]); + $this->assertCount(0, $results); + } + + + } diff --git a/tests/Unit/TransactionUnitTest.php b/tests/Unit/TransactionUnitTest.php new file mode 100644 index 00000000..c35d91c7 --- /dev/null +++ b/tests/Unit/TransactionUnitTest.php @@ -0,0 +1,101 @@ +client = $this->createMock(ClientInterface::class); + $this->requestFactory = $this->createMock(Neo4jRequestFactory::class); + $this->responseParser = $this->createMock(ResponseParser::class); + + $this->transaction = new Transaction( + $this->client, + $this->responseParser, + $this->requestFactory, + $this->clusterAffinity, + $this->transactionId + ); + } + + public function testRunCallsBuildTransactionRunRequest() + { + $query = "CREATE (:Person {name: \$name})"; + $parameters = ['name' => 'Alice']; + + $mockRequest = $this->createMock(RequestInterface::class); + $mockResponse = $this->createMock(ResponseInterface::class); + $mockResultSet = $this->createMock(\Neo4j\QueryAPI\Results\ResultSet::class); + + $this->requestFactory->expects($this->once()) + ->method('buildTransactionRunRequest') + ->with($query, $parameters, $this->transactionId, $this->clusterAffinity) + ->willReturn($mockRequest); + + $this->client->expects($this->once()) + ->method('sendRequest') + ->with($mockRequest) + ->willReturn($mockResponse); + + $this->responseParser->expects($this->once()) + ->method('parseRunQueryResponse') + ->with($mockResponse) + ->willReturn($mockResultSet); + + $result = $this->transaction->run($query, $parameters); + + $this->assertSame($mockResultSet, $result); + } + + public function testCommitCallsBuildCommitRequest() + { + $mockRequest = $this->createMock(RequestInterface::class); + + $this->requestFactory->expects($this->once()) + ->method('buildCommitRequest') + ->with($this->transactionId, $this->clusterAffinity) + ->willReturn($mockRequest); + + $this->client->expects($this->once()) + ->method('sendRequest') + ->with($mockRequest); + + $this->transaction->commit(); + } + + public function testRollbackCallsBuildRollbackRequest() + { + $mockRequest = $this->createMock(RequestInterface::class); + + $this->requestFactory->expects($this->once()) + ->method('buildRollbackRequest') + ->with($this->transactionId, $this->clusterAffinity) + ->willReturn($mockRequest); + + $this->client->expects($this->once()) + ->method('sendRequest') + ->with($mockRequest); + + $this->transaction->rollback(); + } +} From 17b1b03e48c4ab1b777d74d8219648c4c00f88d8 Mon Sep 17 00:00:00 2001 From: Pratiksha Date: Mon, 17 Feb 2025 11:49:07 +0530 Subject: [PATCH 2/2] removed php cs fixer cache --- .php-cs-fixer.cache | 1 - tests/Unit/TransactionUnitTest.php | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 .php-cs-fixer.cache diff --git a/.php-cs-fixer.cache b/.php-cs-fixer.cache deleted file mode 100644 index 24adac01..00000000 --- a/.php-cs-fixer.cache +++ /dev/null @@ -1 +0,0 @@ -{"php":"8.3.16","version":"3.68.5:v3.68.5#7bedb718b633355272428c60736dc97fb96daf27","indent":" ","lineEnding":"\n","rules":{"binary_operator_spaces":{"default":"at_least_single_space"},"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"braces_position":{"allow_single_line_empty_anonymous_classes":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_type_declaration":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_parentheses":true,"no_blank_lines_after_class_opening":true,"no_extra_blank_lines":{"tokens":["use"]},"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"none"},"return_type_declaration":true,"short_scalar_cast":true,"single_import_per_statement":{"group_to_single_imports":false},"single_space_around_construct":{"constructs_followed_by_a_single_space":["abstract","as","case","catch","class","const_import","do","else","elseif","final","finally","for","foreach","function","function_import","if","insteadof","interface","namespace","new","private","protected","public","static","switch","trait","try","use","use_lambda","while"],"constructs_preceded_by_a_single_space":["as","else","elseif","use_lambda"]},"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"unary_operator_spaces":{"only_dec_inc":true},"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"attribute_placement":"ignore","on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_line_after_imports":true,"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"strict_param":true},"hashes":{"tests\/resources\/expected\/complex-query-profile.php":"c0d16588e70d32588ec2e55ba5ae5873","tests\/Unit\/Neo4jExceptionUnitTest.php":"e07e604496e0e4032d2798ee9d2cb1b2","tests\/Unit\/ResultRowTest.php":"b4b307579a75da8307d6d65eb5548cae","tests\/Unit\/Neo4jQueryAPIUnitTest.php":"87e08aca0ccef5589c88bd7249e39496","tests\/Unit\/Neo4jRequestFactoryTest.php":"ebc6d5ee7790df4d69a5b555ad48ff5a","tests\/Unit\/AuthenticationTest.php":"746b185bcfb47a925e35b5b79b854fab","tests\/Integration\/Neo4jOGMTest.php":"e03f51ef605ca818763f3897d7a30830","src\/OGM.php":"211c087b78fca69390701e2f505e46fe","src\/Neo4jQueryAPI.php":"a7a505057617a2de3a94a73065254ecb","src\/BearerAuthentication.php":"51b5f02280a43838465cffa8974648c6","src\/Enums\/AccessMode.php":"88b5c70c4716cc68bcb86e2f162dd347","src\/Results\/ResultRow.php":"92dc1ec9315fa5236a79468ffaf9a60c","src\/Results\/ResultSet.php":"372faa2af185b25b804be1974c34b1ae","src\/Exception\/Neo4jException.php":"89c4c090cd3ba6e94c13eab7ebd0588c","src\/NoAuth.php":"2267e8a5b07aeaaab3165bb105b10807","src\/loginConfig.php":"47e9993051fc556a7fc28bc8f9a01caa","src\/AuthenticateInterface.php":"1da849c5d5b88439e01543d5d5b9f8d9","src\/BasicAuthentication.php":"ab50275cc6841d88d289a63d86ecb118","src\/Configuration.php":"fabfe6acf58bb0bda76453ace4f0757d","src\/ResponseParser.php":"e32270966c3a618bcb5ea9c6497748be","src\/Neo4jRequestFactory.php":"e3279d36e54032c6acf92df10ac47f07","src\/Objects\/Path.php":"e8091a19eb4e70ced4f8f7364dbe78be","src\/Objects\/Node.php":"ac679671f513c6c996dbf75a66fcacb2","src\/Objects\/Authentication.php":"f31af1c057be0f490cc2dba365f03b31","src\/Objects\/ProfiledQueryPlanArguments.php":"02b5fa2d50fec5d0fb0c4ada55ebda69","src\/Objects\/Person.php":"cee5594450a015103e12d4cbe186f167","src\/Objects\/Point.php":"4115d8d1b85a0d6e37b79d303237bcd0","src\/Objects\/ResultSet.php":"a5ba56fc6c6e250c22b183ac26dfd68e","src\/Objects\/ProfiledQueryPlan.php":"75ab6c3ad2ce97675a8e6478d17ac4d9","src\/Objects\/Bookmarks.php":"2c3e7229ce9b56c0352155b3feaac9bb","src\/Objects\/ResultCounters.php":"a9372c98fe7bede10cb004af30ea502f","src\/Objects\/Relationship.php":"e344e22d5a41f1795f3310d55ea51c20","src\/Transaction.php":"ff5454897ddbcc4fc2a984ecb90a90fd","src\/Authentication\/BearerAuthentication.php":"08a9e3c01d3833255cd51c94a17f1aa3","src\/Authentication\/NoAuth.php":"71cc7d784b9d98c62d2342faf38f7dc4","src\/Authentication\/AuthenticateInterface.php":"65b5a1074e11fba04362e754ad97023f","src\/Authentication\/BasicAuthentication.php":"c37b7ef26a59c032ac2a6a7b91c5adae","tests\/Unit\/TransactionUnitTest.php":"e6c97ac9afb0b948ac8216baabfc9e22","tests\/Integration\/Neo4jQueryAPIIntegrationTest.php":"3dc17347951ae97e0131e0793f8f90e5","tests\/Integration\/Neo4jTransactionIntegrationTest.php":"d3a4350d427634b229daeca751d8bf47"}} \ No newline at end of file diff --git a/tests/Unit/TransactionUnitTest.php b/tests/Unit/TransactionUnitTest.php index c35d91c7..0aa7535b 100644 --- a/tests/Unit/TransactionUnitTest.php +++ b/tests/Unit/TransactionUnitTest.php @@ -2,6 +2,7 @@ namespace Neo4j\QueryAPI\Tests\Unit; +use Neo4j\QueryAPI\Results\ResultSet; use PHPUnit\Framework\TestCase; use Neo4j\QueryAPI\Transaction; use Neo4j\QueryAPI\Neo4jRequestFactory; @@ -45,7 +46,7 @@ public function testRunCallsBuildTransactionRunRequest() $mockRequest = $this->createMock(RequestInterface::class); $mockResponse = $this->createMock(ResponseInterface::class); - $mockResultSet = $this->createMock(\Neo4j\QueryAPI\Results\ResultSet::class); + $mockResultSet = $this->createMock(ResultSet::class); $this->requestFactory->expects($this->once()) ->method('buildTransactionRunRequest')