Skip to content

Commit

Permalink
Fix mount url for transactional changes
Browse files Browse the repository at this point in the history
Signed-off-by: Jefersson Nathan <[email protected]>
  • Loading branch information
malukenho committed Jul 6, 2021
1 parent feb4e4d commit 0450e87
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Soql/ConnectionWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 173,7 @@ public function commit(): void

$response = $this->send(new Request(
'POST',
self::SERVICE_COMPOSITE_URL,
sprintf(self::SERVICE_COMPOSITE_URL, $this->apiVersion()),
[],
json_encode($this->compositeList())
));
Expand Down
8 changes: 7 additions & 1 deletion tests/Soql/ConnectionWrapperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 142,13 @@ public function transactional_state(): void
/** @test */
public function transactional_should_throws_exception_when_error_occurs(): void
{
$this->client->expects(self::once())->method('send')->willReturn($this->response);
$this->client->expects(self::once())->method('send')
->with(self::callback(static function (Request $request) : bool {
self::assertSame('/services/data/api-version-456/composite', $request->getUri()->getPath());

return true;
}))
->willReturn($this->response);

$this->response->expects(self::exactly(2))->method('getBody')->willReturn($this->stream);

Expand Down

0 comments on commit 0450e87

Please sign in to comment.