Skip to content

Commit

Permalink
Fix readFile methods
Browse files Browse the repository at this point in the history
  • Loading branch information
mzur committed Aug 25, 2021
1 parent 633cac8 commit 706d5aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ElementsAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ protected function getMediaFiles($path)
*/
protected function getMediaFileDownload($path)
{
$id = $this->getMediaFile($path)['id'];
$id = $this->getMediaFile($path)['bundle'];
$response = $this->client->get("api/media/download/{$id}");

return $response;
Expand Down
6 changes: 3 additions & 3 deletions tests/ElementsAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function testHas()
public function testReadRequest()
{
$mock = new MockHandler([
new Response(200, [], '[{"id":321,"is_dir":false,"mtime":123,"size":456,"path":"my/path"}]'),
new Response(200, [], '[{"bundle":321,"is_dir":false,"mtime":123,"size":456,"path":"my/path"}]'),
new Response(200, [], 'hello world'),
]);
$container = [];
Expand All @@ -121,7 +121,7 @@ public function testReadRequest()
public function testReadFile()
{
$mock = new MockHandler([
new Response(200, [], '[{"id":321,"is_dir":false,"mtime":123,"size":456,"path":"my/path"}]'),
new Response(200, [], '[{"bundle":321,"is_dir":false,"mtime":123,"size":456,"path":"my/path"}]'),
new Response(200, [], 'hello world'),
]);
$handlerStack = HandlerStack::create($mock);
Expand Down Expand Up @@ -166,7 +166,7 @@ public function testReadDir()
public function testReadStreamFile()
{
$mock = new MockHandler([
new Response(200, [], '[{"id":321,"is_dir":false,"mtime":123,"size":456,"path":"my/path"}]'),
new Response(200, [], '[{"bundle":321,"is_dir":false,"mtime":123,"size":456,"path":"my/path"}]'),
new Response(200, [], 'hello world'),
]);
$handlerStack = HandlerStack::create($mock);
Expand Down

0 comments on commit 706d5aa

Please sign in to comment.