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,13 +11,15 @@
namespace Symfony\Component\HttpKernel\Tests\Profiler;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface;
use Symfony\Component\HttpKernel\DataCollector\RequestDataCollector;
use Symfony\Component\HttpKernel\Profiler\FileProfilerStorage;
use Symfony\Component\HttpKernel\Profiler\Profiler;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class ProfilerTest extends \PHPUnit_Framework_TestCase
class ProfilerTest extends TestCase
{
private $tmp;
private $storage;
@@ -32,10 +34,24 @@ class ProfilerTest extends \PHPUnit_Framework_TestCase
$profiler = new Profiler($this->storage);
$profiler->add($collector);
$profile = $profiler->collect($request, $response);
$profiler->saveProfile($profile);
$this->assertSame(204, $profile->getStatusCode());
$this->assertSame('GET', $profile->getMethod());
$this->assertEquals(array('foo' => 'bar'), $profiler->get('request')->getRequestQuery()->all());
$this->assertSame('bar', $profile->getCollector('request')->getRequestQuery()->all()['foo']->getValue());
}
public function testReset()
{
$collector = $this->getMockBuilder(DataCollectorInterface::class)
->setMethods(array('collect', 'getName', 'reset'))
->getMock();
$collector->expects($this->any())->method('getName')->willReturn('mock');
$collector->expects($this->once())->method('reset');
$profiler = new Profiler($this->storage);
$profiler->add($collector);
$profiler->reset();
}
public function testFindWorksWithDates()
@@ -59,6 +75,13 @@ class ProfilerTest extends \PHPUnit_Framework_TestCase
$this->assertCount(0, $profiler->find(null, null, null, null, 'some string', ''));
}
public function testFindWorksWithStatusCode()
{
$profiler = new Profiler($this->storage);
$this->assertCount(0, $profiler->find(null, null, null, null, null, null, '204'));
}
protected function setUp()
{
$this->tmp = tempnam(sys_get_temp_dir(), 'sf2_profiler');