We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 276d203 commit 8633944Copy full SHA for 8633944
1 file changed
tests/Attachment/AttachmentTest.php
@@ -11,12 +11,13 @@ class AttachmentTest extends TestCase
11
{
12
public function testFileAttachment(): void
13
14
- $file = tempnam(sys_get_temp_dir(), 'attachment.txt');
+ // We use 3 char prefix because windows supports only 3
15
+ $file = tempnam(sys_get_temp_dir(), 'att');
16
file_put_contents($file, 'This is a temp attachment');
17
$attachment = Attachment::fromFile($file);
18
$this->assertEquals(25, $attachment->getSize());
19
$this->assertEquals('This is a temp attachment', $attachment->getData());
- $this->assertStringStartsWith('attachment.txt', $attachment->getFilename());
20
+ $this->assertStringStartsWith('att', $attachment->getFilename());
21
$this->assertEquals('application/octet-stream', $attachment->getContentType());
22
}
23
0 commit comments