Kernel : Linux vmw02p.internet-indee.net 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Tue Nov 16 14:42:35 UTC 2021 x86_64
Disable function : NONE
Safe mode : OFF
Host : firofichi.it | Server ip : 5.196.164.15 | Your ip : 3.133.134.58 | Time @ Server : 19 Oct 2024 08:22:26
MySQL : OFF | MSSQL : OFF | cURL : ON | Oracle : OFF | wget : ON | Perl : ON

/home/webmaster/firofichi/www/vendor/magento/framework/Config/Test/Unit/

HOME about upload exec mass file domain root vuln newfile newfolder kill me

File Path : /home/webmaster/firofichi/www/vendor/magento/framework/Config/Test/Unit/FileIteratorTest.php

<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\Framework\Config\Test\Unit; use \Magento\Framework\Config\FileIterator; /** * Class FileIteratorTest */ class FileIteratorTest extends \PHPUnit\Framework\TestCase { /** * @var FileIterator */ protected $fileIterator; /** * @var \Magento\Framework\Filesystem\File\Read|\PHPUnit_Framework_MockObject_MockObject */ protected $fileRead; /** * Array of relative file paths * * @var array */ protected $filePaths; /** * @var \Magento\Framework\Filesystem\File\ReadFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $fileReadFactory; protected function setUp() { $this->filePaths = ['/file1', '/file2']; $this->fileReadFactory = $this->createMock(\Magento\Framework\Filesystem\File\ReadFactory::class); $this->fileRead = $this->createMock(\Magento\Framework\Filesystem\File\Read::class); $this->fileIterator = new FileIterator($this->fileReadFactory, $this->filePaths); } protected function tearDown() { $this->fileIterator = null; $this->filePaths = null; } public function testIterator() { $contents = ['content1', 'content2']; $index = 0; foreach ($this->filePaths as $filePath) { $this->fileReadFactory->expects($this->at($index)) ->method('create') ->with($filePath) ->willReturn($this->fileRead); $this->fileRead->expects($this->at($index)) ->method('readAll') ->will($this->returnValue($contents[$index++])); } $index = 0; foreach ($this->fileIterator as $fileContent) { $this->assertEquals($contents[$index++], $fileContent); } } public function testToArray() { $contents = ['content1', 'content2']; $expectedArray = []; $index = 0; foreach ($this->filePaths as $filePath) { $expectedArray[$filePath] = $contents[$index]; $this->fileReadFactory->expects($this->at($index)) ->method('create') ->with($filePath) ->willReturn($this->fileRead); $this->fileRead->expects($this->at($index)) ->method('readAll') ->will($this->returnValue($contents[$index++])); } $this->assertEquals($expectedArray, $this->fileIterator->toArray()); } }