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:
@@ -17,6 +17,7 @@ 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)));
|
||||
|
Reference in New Issue
Block a user