File: UploadedFileTest.php

package info (click to toggle)
php-http-psr7-integration-tests 1.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 452 kB
  • sloc: php: 1,593; makefile: 19
file content (20 lines) | stat: -rw-r--r-- 438 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php

namespace Http\Psr7Test\Tests\Slim;

use Http\Psr7Test\UploadedFileIntegrationTest;
use Slim\Psr7\UploadedFile;

class UploadedFileTest extends UploadedFileIntegrationTest
{
    public function createSubject()
    {
        $tmpfname = tempnam('/tmp', 'foobar');

        $handle = fopen($tmpfname, 'w');
        fwrite($handle, 'writing to tempfile');
        fclose($handle);

        return new UploadedFile($tmpfname);
    }
}