Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion tests/DefaultLogWriterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function it_logs_files()
}

/** @test */
public function it_logs_files_in_an_array()
public function it_logs_one_file_in_an_array()
{
$file = $this->getTempFile();

Expand All @@ -98,4 +98,24 @@ public function it_logs_files_in_an_array()

$this->assertStringContainsString('test.md', $log);
}

/** @test */
public function it_logs_multiple_files_in_an_array()
{
$file = $this->getTempFile();

$request = $this->makeRequest('post', $this->uri, [], [], [
'files' => [
new UploadedFile($file, 'first.doc'),
new UploadedFile($file, 'second.doc'),
],
]);

$this->logger->logRequest($request);

$log = $this->readLogFile();

$this->assertStringContainsString('first.doc', $log);
$this->assertStringContainsString('second.doc', $log);
}
}