mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-03 05:29:53 +09:00
update to laravel 5.7 and try getting autologin saved
This commit is contained in:
@@ -12,11 +12,11 @@
|
||||
namespace Symfony\Component\HttpKernel\Tests\DataCollector;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\HttpKernel\DataCollector\ConfigDataCollector;
|
||||
use Symfony\Component\HttpKernel\Kernel;
|
||||
use Symfony\Component\Config\Loader\LoaderInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\DataCollector\ConfigDataCollector;
|
||||
use Symfony\Component\HttpKernel\Kernel;
|
||||
|
||||
class ConfigDataCollectorTest extends TestCase
|
||||
{
|
||||
@@ -38,9 +38,9 @@ class ConfigDataCollectorTest extends TestCase
|
||||
$this->assertSame(date_default_timezone_get(), $c->getPhpTimezone());
|
||||
$this->assertSame(Kernel::VERSION, $c->getSymfonyVersion());
|
||||
$this->assertNull($c->getToken());
|
||||
$this->assertSame(extension_loaded('xdebug'), $c->hasXDebug());
|
||||
$this->assertSame(extension_loaded('Zend OPcache') && ini_get('opcache.enable'), $c->hasZendOpcache());
|
||||
$this->assertSame(extension_loaded('apcu') && ini_get('apc.enabled'), $c->hasApcu());
|
||||
$this->assertSame(\extension_loaded('xdebug'), $c->hasXDebug());
|
||||
$this->assertSame(\extension_loaded('Zend OPcache') && ini_get('opcache.enable'), $c->hasZendOpcache());
|
||||
$this->assertSame(\extension_loaded('apcu') && ini_get('apc.enabled'), $c->hasApcu());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,11 +12,12 @@
|
||||
namespace Symfony\Component\HttpKernel\Tests\DataCollector;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\HttpKernel\DataCollector\DumpDataCollector;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\DataCollector\DumpDataCollector;
|
||||
use Symfony\Component\VarDumper\Cloner\Data;
|
||||
use Symfony\Component\VarDumper\Dumper\CliDumper;
|
||||
use Symfony\Component\VarDumper\Server\Connection;
|
||||
|
||||
/**
|
||||
* @author Nicolas Grekas <p@tchwork.com>
|
||||
@@ -56,6 +57,24 @@ class DumpDataCollectorTest extends TestCase
|
||||
$this->assertSame('a:2:{i:0;b:0;i:1;s:5:"UTF-8";}', $collector->serialize());
|
||||
}
|
||||
|
||||
public function testDumpWithServerConnection()
|
||||
{
|
||||
$data = new Data(array(array(123)));
|
||||
|
||||
// Server is up, server dumper is used
|
||||
$serverDumper = $this->getMockBuilder(Connection::class)->disableOriginalConstructor()->getMock();
|
||||
$serverDumper->expects($this->once())->method('write')->willReturn(true);
|
||||
|
||||
$collector = new DumpDataCollector(null, null, null, null, $serverDumper);
|
||||
$collector->dump($data);
|
||||
|
||||
// Collect doesn't re-trigger dump
|
||||
ob_start();
|
||||
$collector->collect(new Request(), new Response());
|
||||
$this->assertEmpty(ob_get_clean());
|
||||
$this->assertStringMatchesFormat('a:3:{i:0;a:5:{s:4:"data";%c:39:"Symfony\Component\VarDumper\Cloner\Data":%a', $collector->serialize());
|
||||
}
|
||||
|
||||
public function testCollectDefault()
|
||||
{
|
||||
$data = new Data(array(array(123)));
|
||||
|
||||
@@ -13,9 +13,9 @@ namespace Symfony\Component\HttpKernel\Tests\DataCollector;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Debug\Exception\FlattenException;
|
||||
use Symfony\Component\HttpKernel\DataCollector\ExceptionDataCollector;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\DataCollector\ExceptionDataCollector;
|
||||
|
||||
class ExceptionDataCollectorTest extends TestCase
|
||||
{
|
||||
|
||||
@@ -13,7 +13,11 @@ namespace Symfony\Component\HttpKernel\Tests\DataCollector;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Debug\Exception\SilencedErrorContext;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\RequestStack;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\DataCollector\LoggerDataCollector;
|
||||
use Symfony\Component\HttpKernel\Log\DebugLoggerInterface;
|
||||
|
||||
class LoggerDataCollectorTest extends TestCase
|
||||
{
|
||||
@@ -41,6 +45,46 @@ class LoggerDataCollectorTest extends TestCase
|
||||
), $compilerLogs['Unknown Compiler Pass']);
|
||||
}
|
||||
|
||||
public function testWithMasterRequest()
|
||||
{
|
||||
$masterRequest = new Request();
|
||||
$stack = new RequestStack();
|
||||
$stack->push($masterRequest);
|
||||
|
||||
$logger = $this
|
||||
->getMockBuilder(DebugLoggerInterface::class)
|
||||
->setMethods(array('countErrors', 'getLogs', 'clear'))
|
||||
->getMock();
|
||||
$logger->expects($this->once())->method('countErrors')->with(null);
|
||||
$logger->expects($this->exactly(2))->method('getLogs')->with(null)->will($this->returnValue(array()));
|
||||
|
||||
$c = new LoggerDataCollector($logger, __DIR__.'/', $stack);
|
||||
|
||||
$c->collect($masterRequest, new Response());
|
||||
$c->lateCollect();
|
||||
}
|
||||
|
||||
public function testWithSubRequest()
|
||||
{
|
||||
$masterRequest = new Request();
|
||||
$subRequest = new Request();
|
||||
$stack = new RequestStack();
|
||||
$stack->push($masterRequest);
|
||||
$stack->push($subRequest);
|
||||
|
||||
$logger = $this
|
||||
->getMockBuilder(DebugLoggerInterface::class)
|
||||
->setMethods(array('countErrors', 'getLogs', 'clear'))
|
||||
->getMock();
|
||||
$logger->expects($this->once())->method('countErrors')->with($subRequest);
|
||||
$logger->expects($this->exactly(2))->method('getLogs')->with($subRequest)->will($this->returnValue(array()));
|
||||
|
||||
$c = new LoggerDataCollector($logger, __DIR__.'/', $stack);
|
||||
|
||||
$c->collect($subRequest, new Response());
|
||||
$c->lateCollect();
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider getCollectTestData
|
||||
*/
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
namespace Symfony\Component\HttpKernel\Tests\DataCollector;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\HttpKernel\DataCollector\MemoryDataCollector;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\DataCollector\MemoryDataCollector;
|
||||
|
||||
class MemoryDataCollectorTest extends TestCase
|
||||
{
|
||||
|
||||
@@ -12,20 +12,20 @@
|
||||
namespace Symfony\Component\HttpKernel\Tests\DataCollector;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||
use Symfony\Component\HttpFoundation\Cookie;
|
||||
use Symfony\Component\HttpFoundation\ParameterBag;
|
||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpFoundation\Session\Session;
|
||||
use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
|
||||
use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface;
|
||||
use Symfony\Component\HttpKernel\DataCollector\RequestDataCollector;
|
||||
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
|
||||
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
|
||||
use Symfony\Component\HttpKernel\HttpKernel;
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
use Symfony\Component\HttpKernel\DataCollector\RequestDataCollector;
|
||||
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpFoundation\Cookie;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||
|
||||
class RequestDataCollectorTest extends TestCase
|
||||
{
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
namespace Symfony\Component\HttpKernel\Tests\DataCollector;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\HttpKernel\DataCollector\TimeDataCollector;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\DataCollector\TimeDataCollector;
|
||||
|
||||
/**
|
||||
* @group time-sensitive
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\HttpKernel\Tests\DataCollector\Util;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\HttpKernel\DataCollector\Util\ValueExporter;
|
||||
|
||||
/**
|
||||
* @group legacy
|
||||
*/
|
||||
class ValueExporterTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var ValueExporter
|
||||
*/
|
||||
private $valueExporter;
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
$this->valueExporter = new ValueExporter();
|
||||
}
|
||||
|
||||
public function testDateTime()
|
||||
{
|
||||
$dateTime = new \DateTime('2014-06-10 07:35:40', new \DateTimeZone('UTC'));
|
||||
$this->assertSame('Object(DateTime) - 2014-06-10T07:35:40+00:00', $this->valueExporter->exportValue($dateTime));
|
||||
}
|
||||
|
||||
public function testDateTimeImmutable()
|
||||
{
|
||||
$dateTime = new \DateTimeImmutable('2014-06-10 07:35:40', new \DateTimeZone('UTC'));
|
||||
$this->assertSame('Object(DateTimeImmutable) - 2014-06-10T07:35:40+00:00', $this->valueExporter->exportValue($dateTime));
|
||||
}
|
||||
|
||||
public function testIncompleteClass()
|
||||
{
|
||||
$foo = new \__PHP_Incomplete_Class();
|
||||
$array = new \ArrayObject($foo);
|
||||
$array['__PHP_Incomplete_Class_Name'] = 'AppBundle/Foo';
|
||||
$this->assertSame('__PHP_Incomplete_Class(AppBundle/Foo)', $this->valueExporter->exportValue($foo));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user