404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.12.165.68: ~ $
<?php

/*
 * This file is part of Psy Shell.
 *
 * (c) 2012-2023 Justin Hileman
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/**
 * A compatibility shim for PHPUnit's TestCase, so we can use modern-ish exception expectations on
 * older PHPUnit versions.
 *
 * @todo Remove shims whenever we update minimum PHPUnit versions.
 */

namespace Psy\Test;

// PHPUnit <= 9
trait AssertMatchesRegularExpressionForwardCompatibility
{
    public static function assertMatchesRegularExpression(string $pattern, string $string, string $message = '')
    {
        static::assertRegExp($pattern, $string, $message);
    }
}

// PHPUnit <= 8
trait ExpectExceptionMessagMatchesForwardCompatibility
{
    public function expectExceptionMessageMatches($regularExpression)
    {
        if (\method_exists(\PHPUnit\Framework\TestCase::class, 'expectExceptionMessageRegExp')) {
            parent::expectExceptionMessageRegExp($regularExpression);
        } else {
            $this->setExpectedExceptionRegExp($this->getExpectedException(), $regularExpression);
        }
    }
}

// PHPUnit <= 7
trait AssertContainsForwardCompatibility
{
    public static function assertStringContainsString($needle, $haystack, $message = '')
    {
        static::assertContains((string) $needle, (string) $haystack, $message);
    }

    public static function assertStringContainsStringIgnoringCase($needle, $haystack, $message = '')
    {
        static::assertContains((string) $needle, (string) $haystack, $message, true);
    }

    public static function assertStringNotContainsString($needle, $haystack, $message = '')
    {
        static::assertNotContains((string) $needle, (string) $haystack, $message);
    }

    public static function assertStringNotContainsStringIgnoringCase($needle, $haystack, $message = '')
    {
        static::assertNotContains((string) $needle, (string) $haystack, $message, true);
    }
}

if (\method_exists(\PHPUnit\Framework\TestCase::class, 'assertStringContainsString')) {
    if (\method_exists(\PHPUnit\Framework\TestCase::class, 'expectExceptionMessageMatches')) {
        if (\method_exists(\PHPUnit\Framework\TestCase::class, 'assertMatchesRegularExpression')) {
            abstract class TestCase extends \PHPUnit\Framework\TestCase
            {
                // No forward compatibility needed!
            }
        } else {
            abstract class TestCase extends \PHPUnit\Framework\TestCase
            {
                use AssertMatchesRegularExpressionForwardCompatibility;
            }
        }
    } else {
        abstract class TestCase extends \PHPUnit\Framework\TestCase
        {
            use AssertMatchesRegularExpressionForwardCompatibility;
            use ExpectExceptionMessagMatchesForwardCompatibility;
        }
    }
} else {
    abstract class TestCase extends \PHPUnit\Framework\TestCase
    {
        use AssertContainsForwardCompatibility;
        use AssertMatchesRegularExpressionForwardCompatibility;
        use ExpectExceptionMessagMatchesForwardCompatibility;
    }
}

Filemanager

Name Type Size Permission Actions
CodeCleaner Folder 0755
Command Folder 0755
Exception Folder 0755
Formatter Folder 0755
Input Folder 0755
Readline Folder 0755
Reflection Folder 0755
Sudo Folder 0755
TabCompletion Folder 0755
Util Folder 0755
VersionUpdater Folder 0755
fixtures Folder 0755
tools Folder 0755
ClassWithSecretConstructor.php File 507 B 0644
ClassWithSecretParentConstructor.php File 358 B 0644
ClassWithSecretiveParent.php File 340 B 0644
ClassWithSecrets.php File 928 B 0644
CodeCleanerTest.php File 3.26 KB 0644
ConfigPathsTest.php File 7.08 KB 0644
ConfigurationTest.php File 21.81 KB 0644
ContextTest.php File 9.57 KB 0644
FakeShell.php File 582 B 0644
ParserFactoryTest.php File 1.22 KB 0644
ParserTestCase.php File 2.51 KB 0644
ShellTest.php File 20.03 KB 0644
SudoTest.php File 5.49 KB 0644
TestCase.php File 3.15 KB 0644
TestableEnv.php File 560 B 0644