HttpUploadedFileTest.php 543 B

12345678910111213141516171819202122
  1. <?php
  2. namespace Illuminate\Tests\Http;
  3. use Illuminate\Http\UploadedFile;
  4. use PHPUnit\Framework\TestCase;
  5. class HttpUploadedFileTest extends TestCase
  6. {
  7. public function testUploadedFileCanRetrieveContentsFromTextFile()
  8. {
  9. $file = new UploadedFile(
  10. __DIR__.'/fixtures/test.txt',
  11. 'test.txt',
  12. null,
  13. null,
  14. true
  15. );
  16. $this->assertSame('This is a story about something that happened long ago when your grandfather was a child.', trim($file->get()));
  17. }
  18. }