Kernel : Linux vmi616275.contaboserver.net 5.4.0-84-generic #94-Ubuntu SMP Thu Aug 26 20:27:37 UTC 2021 x86_64
Disable function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Safe mode : OFF
Host : diestoffstrasse.com | Server ip : 127.0.0.1 | Your ip : 127.0.0.1 | Time @ Server : 24 Aug 2025 15:17:44
MySQL : OFF | MSSQL : OFF | cURL : ON | Oracle : OFF | wget : ON | Perl : ON

/home/dev2.destoffenstraat.com/vendor-1/magento/framework/DB/Test/Unit/Logger/

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

File Path : /home/dev2.destoffenstraat.com/vendor-1/magento/framework/DB/Test/Unit/Logger/FileTest.php

<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ declare(strict_types=1); namespace Magento\Framework\DB\Test\Unit\Logger; use Magento\Framework\DB\Logger\File; use Magento\Framework\DB\LoggerInterface; use Magento\Framework\Filesystem; use Magento\Framework\Filesystem\File\WriteInterface; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class FileTest extends TestCase { const DEBUG_FILE = 'debug.file.log'; /** * @var WriteInterface|MockObject */ private $stream; /** * @var \Magento\Framework\Filesystem\Directory\WriteInterface|MockObject */ private $dir; /** * @var File */ private $object; protected function setUp(): void { $this->stream = $this->getMockForAbstractClass(WriteInterface::class); $this->dir = $this->getMockForAbstractClass(\Magento\Framework\Filesystem\Directory\WriteInterface::class); $this->dir->expects($this->any()) ->method('openFile') ->with(self::DEBUG_FILE, 'a') ->willReturn($this->stream); $filesystem = $this->createMock(Filesystem::class); $filesystem->expects($this->any()) ->method('getDirectoryWrite') ->willReturn($this->dir); $this->object = new File( $filesystem, self::DEBUG_FILE ); } public function testLog() { $input = 'message'; $expected = '%amessage'; $this->stream->expects($this->once()) ->method('write') ->with($this->matches($expected)); $this->object->log($input); } /** * @param $type * * @param string $q * @param array $bind * @param \Zend_Db_Statement_Pdo|null $result * @param string $expected * @dataProvider logStatsDataProvider */ public function testLogStats($type, $q, array $bind, $result, $expected) { $this->stream->expects($this->once()) ->method('write') ->with($this->matches($expected)); $this->object->logStats($type, $q, $bind, $result); } /** * @return array */ public function logStatsDataProvider() { return [ [LoggerInterface::TYPE_CONNECT, '', [], null, '%aCONNECT%a'], [ LoggerInterface::TYPE_TRANSACTION, 'SELECT something', [], null, '%aTRANSACTION SELECT something%a' ], [ LoggerInterface::TYPE_QUERY, 'SELECT something', [], null, '%aSQL: SELECT something%a' ], [ LoggerInterface::TYPE_QUERY, 'SELECT something', ['data'], null, "%aQUERY%aSQL: SELECT something%aBIND: array (%a0 => 'data',%a)%a" ], ]; } public function testLogStatsWithResult() { $result = $this->createMock(\Zend_Db_Statement_Pdo::class); $result->expects($this->once()) ->method('rowCount') ->willReturn(10); $this->stream->expects($this->once()) ->method('write') ->with($this->logicalNot($this->matches('%aSQL: SELECT something%aAFF: 10'))); $this->object->logStats( LoggerInterface::TYPE_QUERY, 'SELECT something', [], $result ); } public function testLogStatsUnknownType() { $this->stream->expects($this->once()) ->method('write') ->with($this->logicalNot($this->matches('%aSELECT something%a'))); $this->object->logStats('unknown', 'SELECT something'); } public function testcritical() { $exception = new \Exception('error message'); $expected = "%aEXCEPTION%aException%aerror message%a"; $this->stream->expects($this->once()) ->method('write') ->with($this->matches($expected)); $this->object->critical($exception); } }