X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=vendor%2Fsymfony%2Fhttp-kernel%2FTests%2FDataCollector%2FDataCollectorTest.php;h=54fd39e0d8c8f65d57ead5c5069fd5725e79c33a;hb=9e65bae52407293a5182f19dc57b5628b09e92f4;hp=0af51db6ad098bbfcb3d6c0275bbe99c68fe6847;hpb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;p=yaffs-website diff --git a/vendor/symfony/http-kernel/Tests/DataCollector/DataCollectorTest.php b/vendor/symfony/http-kernel/Tests/DataCollector/DataCollectorTest.php index 0af51db6a..54fd39e0d 100644 --- a/vendor/symfony/http-kernel/Tests/DataCollector/DataCollectorTest.php +++ b/vendor/symfony/http-kernel/Tests/DataCollector/DataCollectorTest.php @@ -15,9 +15,7 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Tests\Fixtures\DataCollector\CloneVarDataCollector; -use Symfony\Component\VarDumper\Cloner\Stub; use Symfony\Component\VarDumper\Cloner\VarCloner; -use Symfony\Component\VarDumper\Dumper\CliDumper; class DataCollectorTest extends TestCase { @@ -32,19 +30,9 @@ class DataCollectorTest extends TestCase public function testCloneVarExistingFilePath() { - $c = new CloneVarDataCollector($filePath = tempnam(sys_get_temp_dir(), 'clone_var_data_collector_')); + $c = new CloneVarDataCollector(array($filePath = tempnam(sys_get_temp_dir(), 'clone_var_data_collector_'))); $c->collect(new Request(), new Response()); - $data = $c->getData(); - $this->assertInstanceOf(Stub::class, $data->getRawData()[0][0]); - $this->assertDumpEquals("\"$filePath\"", $data); - } - - private function assertDumpEquals($dump, $data, $message = '') - { - $dumper = new CliDumper(); - $dumper->setColors(false); - - $this->assertSame(rtrim($dump), rtrim($dumper->dump($data, true)), $message); + $this->assertSame($filePath, $c->getData()[0]); } }