You are here

public function UploadedFileTest::testGetSize in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Tests/File/UploadedFileTest.php \Symfony\Component\HttpFoundation\Tests\File\UploadedFileTest::testGetSize()

File

vendor/symfony/http-foundation/Tests/File/UploadedFileTest.php, line 187

Class

UploadedFileTest

Namespace

Symfony\Component\HttpFoundation\Tests\File

Code

public function testGetSize() {
  $file = new UploadedFile(__DIR__ . '/Fixtures/test.gif', 'original.gif', 'image/gif', filesize(__DIR__ . '/Fixtures/test.gif'), null);
  $this
    ->assertEquals(filesize(__DIR__ . '/Fixtures/test.gif'), $file
    ->getSize());
  $file = new UploadedFile(__DIR__ . '/Fixtures/test', 'original.gif', 'image/gif');
  $this
    ->assertEquals(filesize(__DIR__ . '/Fixtures/test'), $file
    ->getSize());
}