Laravel 5.6 updates
Travis config update Removed HHVM script as Laravel no longer support HHVM after releasing 5.3
This commit is contained in:
@@ -34,14 +34,14 @@ class FileBagTest extends TestCase
|
||||
public function testShouldConvertsUploadedFiles()
|
||||
{
|
||||
$tmpFile = $this->createTempFile();
|
||||
$file = new UploadedFile($tmpFile, basename($tmpFile), 'text/plain', 100, 0);
|
||||
$file = new UploadedFile($tmpFile, basename($tmpFile), 'text/plain');
|
||||
|
||||
$bag = new FileBag(array('file' => array(
|
||||
'name' => basename($tmpFile),
|
||||
'type' => 'text/plain',
|
||||
'tmp_name' => $tmpFile,
|
||||
'error' => 0,
|
||||
'size' => 100,
|
||||
'size' => null,
|
||||
)));
|
||||
|
||||
$this->assertEquals($file, $bag->get('file'));
|
||||
@@ -89,7 +89,7 @@ class FileBagTest extends TestCase
|
||||
public function testShouldConvertUploadedFilesWithPhpBug()
|
||||
{
|
||||
$tmpFile = $this->createTempFile();
|
||||
$file = new UploadedFile($tmpFile, basename($tmpFile), 'text/plain', 100, 0);
|
||||
$file = new UploadedFile($tmpFile, basename($tmpFile), 'text/plain');
|
||||
|
||||
$bag = new FileBag(array(
|
||||
'child' => array(
|
||||
@@ -106,7 +106,7 @@ class FileBagTest extends TestCase
|
||||
'file' => 0,
|
||||
),
|
||||
'size' => array(
|
||||
'file' => 100,
|
||||
'file' => null,
|
||||
),
|
||||
),
|
||||
));
|
||||
@@ -118,7 +118,7 @@ class FileBagTest extends TestCase
|
||||
public function testShouldConvertNestedUploadedFilesWithPhpBug()
|
||||
{
|
||||
$tmpFile = $this->createTempFile();
|
||||
$file = new UploadedFile($tmpFile, basename($tmpFile), 'text/plain', 100, 0);
|
||||
$file = new UploadedFile($tmpFile, basename($tmpFile), 'text/plain');
|
||||
|
||||
$bag = new FileBag(array(
|
||||
'child' => array(
|
||||
@@ -135,7 +135,7 @@ class FileBagTest extends TestCase
|
||||
'sub' => array('file' => 0),
|
||||
),
|
||||
'size' => array(
|
||||
'sub' => array('file' => 100),
|
||||
'sub' => array('file' => null),
|
||||
),
|
||||
),
|
||||
));
|
||||
@@ -147,7 +147,7 @@ class FileBagTest extends TestCase
|
||||
public function testShouldNotConvertNestedUploadedFiles()
|
||||
{
|
||||
$tmpFile = $this->createTempFile();
|
||||
$file = new UploadedFile($tmpFile, basename($tmpFile), 'text/plain', 100, 0);
|
||||
$file = new UploadedFile($tmpFile, basename($tmpFile), 'text/plain');
|
||||
$bag = new FileBag(array('image' => array('file' => $file)));
|
||||
|
||||
$files = $bag->all();
|
||||
@@ -156,7 +156,10 @@ class FileBagTest extends TestCase
|
||||
|
||||
protected function createTempFile()
|
||||
{
|
||||
return tempnam(sys_get_temp_dir().'/form_test', 'FormTest');
|
||||
$tempFile = tempnam(sys_get_temp_dir().'/form_test', 'FormTest');
|
||||
file_put_contents($tempFile, '1');
|
||||
|
||||
return $tempFile;
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
|
Reference in New Issue
Block a user