Laravel version update

Laravel version update
This commit is contained in:
Manish Verma
2018-08-06 18:48:58 +05:30
parent d143048413
commit 126fbb0255
13678 changed files with 1031482 additions and 778530 deletions

View File

@@ -11,10 +11,11 @@
namespace Symfony\Component\HttpKernel\Tests\Profiler;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpKernel\Profiler\FileProfilerStorage;
use Symfony\Component\HttpKernel\Profiler\Profile;
class FileProfilerStorageTest extends \PHPUnit_Framework_TestCase
class FileProfilerStorageTest extends TestCase
{
private $tmpDir;
private $storage;
@@ -82,22 +83,22 @@ class FileProfilerStorageTest extends \PHPUnit_Framework_TestCase
$profile = new Profile('simple_quote');
$profile->setUrl('http://foo.bar/\'');
$this->storage->write($profile);
$this->assertTrue(false !== $this->storage->read('simple_quote'), '->write() accepts single quotes in URL');
$this->assertNotFalse($this->storage->read('simple_quote'), '->write() accepts single quotes in URL');
$profile = new Profile('double_quote');
$profile->setUrl('http://foo.bar/"');
$this->storage->write($profile);
$this->assertTrue(false !== $this->storage->read('double_quote'), '->write() accepts double quotes in URL');
$this->assertNotFalse($this->storage->read('double_quote'), '->write() accepts double quotes in URL');
$profile = new Profile('backslash');
$profile->setUrl('http://foo.bar/\\');
$this->storage->write($profile);
$this->assertTrue(false !== $this->storage->read('backslash'), '->write() accepts backslash in URL');
$this->assertNotFalse($this->storage->read('backslash'), '->write() accepts backslash in URL');
$profile = new Profile('comma');
$profile->setUrl('http://foo.bar/,');
$this->storage->write($profile);
$this->assertTrue(false !== $this->storage->read('comma'), '->write() accepts comma in URL');
$this->assertNotFalse($this->storage->read('comma'), '->write() accepts comma in URL');
}
public function testStoreDuplicateToken()
@@ -127,6 +128,20 @@ class FileProfilerStorageTest extends \PHPUnit_Framework_TestCase
$this->assertCount(0, $this->storage->find('127.0._.1', '', 10, 'GET'), '->find() does not interpret a "_" as a wildcard in the IP');
}
public function testRetrieveByStatusCode()
{
$profile200 = new Profile('statuscode200');
$profile200->setStatusCode(200);
$this->storage->write($profile200);
$profile404 = new Profile('statuscode404');
$profile404->setStatusCode(404);
$this->storage->write($profile404);
$this->assertCount(1, $this->storage->find(null, null, 10, null, null, null, '200'), '->find() retrieve a record by Status code 200');
$this->assertCount(1, $this->storage->find(null, null, 10, null, null, null, '404'), '->find() retrieve a record by Status code 404');
}
public function testRetrieveByUrl()
{
$profile = new Profile('simple_quote');
@@ -232,7 +247,7 @@ class FileProfilerStorageTest extends \PHPUnit_Framework_TestCase
$profile->setMethod('GET');
$this->storage->write($profile);
$this->assertTrue(false !== $this->storage->read('token1'));
$this->assertNotFalse($this->storage->read('token1'));
$this->assertCount(1, $this->storage->find('127.0.0.1', '', 10, 'GET'));
$profile = new Profile('token2');
@@ -241,7 +256,7 @@ class FileProfilerStorageTest extends \PHPUnit_Framework_TestCase
$profile->setMethod('GET');
$this->storage->write($profile);
$this->assertTrue(false !== $this->storage->read('token2'));
$this->assertNotFalse($this->storage->read('token2'));
$this->assertCount(2, $this->storage->find('127.0.0.1', '', 10, 'GET'));
$this->storage->purge();