update to laravel 5.7 and try getting autologin saved

This commit is contained in:
Kode
2018-10-14 20:50:32 +01:00
parent c3da17befc
commit 6501aacb1b
2402 changed files with 79064 additions and 28971 deletions

View File

@@ -12,11 +12,11 @@
namespace Symfony\Component\HttpKernel\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpKernel\Client;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\StreamedResponse;
use Symfony\Component\HttpFoundation\Cookie;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\StreamedResponse;
use Symfony\Component\HttpKernel\Client;
use Symfony\Component\HttpKernel\Tests\Fixtures\TestClient;
/**
@@ -100,8 +100,8 @@ class ClientTest extends TestCase
$client = new Client($kernel);
$files = array(
array('tmp_name' => $source, 'name' => 'original', 'type' => 'mime/original', 'size' => 1, 'error' => UPLOAD_ERR_OK),
new UploadedFile($source, 'original', 'mime/original', 1, UPLOAD_ERR_OK, true),
array('tmp_name' => $source, 'name' => 'original', 'type' => 'mime/original', 'size' => null, 'error' => UPLOAD_ERR_OK),
new UploadedFile($source, 'original', 'mime/original', UPLOAD_ERR_OK, true),
);
$file = null;
@@ -116,11 +116,10 @@ class ClientTest extends TestCase
$this->assertEquals('original', $file->getClientOriginalName());
$this->assertEquals('mime/original', $file->getClientMimeType());
$this->assertSame(1, $file->getClientSize());
$this->assertTrue($file->isValid());
$this->assertEquals(1, $file->getSize());
}
$file->move(dirname($target), basename($target));
$file->move(\dirname($target), basename($target));
$this->assertFileExists($target);
unlink($target);
@@ -150,15 +149,19 @@ class ClientTest extends TestCase
$file = $this
->getMockBuilder('Symfony\Component\HttpFoundation\File\UploadedFile')
->setConstructorArgs(array($source, 'original', 'mime/original', 123, UPLOAD_ERR_OK, true))
->setMethods(array('getSize'))
->setConstructorArgs(array($source, 'original', 'mime/original', UPLOAD_ERR_OK, true))
->setMethods(array('getSize', 'getClientSize'))
->getMock()
;
$file->expects($this->once())
/* should be modified when the getClientSize will be removed */
$file->expects($this->any())
->method('getSize')
->will($this->returnValue(INF))
;
$file->expects($this->any())
->method('getClientSize')
->will($this->returnValue(INF))
;
$client->request('POST', '/', array(), array($file));
@@ -172,7 +175,7 @@ class ClientTest extends TestCase
$this->assertEquals(UPLOAD_ERR_INI_SIZE, $file->getError());
$this->assertEquals('mime/original', $file->getClientMimeType());
$this->assertEquals('original', $file->getClientOriginalName());
$this->assertEquals(0, $file->getClientSize());
$this->assertEquals(0, $file->getSize());
unlink($source);
}