404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.22.74.25: ~ $
<?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.
 */

namespace Psy\Test\CodeCleaner;

use Psy\CodeCleaner\MagicConstantsPass;

class MagicConstantsPassTest extends CodeCleanerTestCase
{
    /**
     * @before
     */
    public function getReady()
    {
        $this->setPass(new MagicConstantsPass());
    }

    /**
     * @dataProvider magicConstants
     */
    public function testProcess($from, $to)
    {
        $this->assertProcessesAs($from, $to);
    }

    public function magicConstants()
    {
        return [
            ['__DIR__;', 'getcwd();'],
            ['__FILE__;', "'';"],
            ['___FILE___;', '___FILE___;'],
        ];
    }
}

Filemanager

Name Type Size Permission Actions
Fixtures Folder 0755
AbstractClassPassTest.php File 1.42 KB 0644
AssignThisVariablePassTest.php File 1.32 KB 0644
CallTimePassByReferencePassTest.php File 1.37 KB 0644
CalledClassPassTest.php File 2.71 KB 0644
CodeCleanerTestCase.php File 961 B 0644
EmptyArrayDimFetchPassTest.php File 1.41 KB 0644
ExitPassTest.php File 1.98 KB 0644
FinalClassPassTest.php File 1.52 KB 0644
FunctionContextPassTest.php File 1.26 KB 0644
FunctionReturnInWriteContextPassTest.php File 1.82 KB 0644
ImplicitReturnPassTest.php File 2.12 KB 0644
InstanceOfPassTest.php File 2.84 KB 0644
IssetPassTest.php File 3.24 KB 0644
LabelContextPassTest.php File 2.16 KB 0644
LeavePsyshAlonePassTest.php File 1.63 KB 0644
ListPassTest.php File 3.67 KB 0644
LoopContextPassTest.php File 3.57 KB 0644
MagicConstantsPassTest.php File 866 B 0644
NamespacePassTest.php File 1.92 KB 0644
NoReturnValueTest.php File 786 B 0644
PassableByReferencePassTest.php File 3 KB 0644
RequirePassTest.php File 2.89 KB 0644
ReturnTypePassTest.php File 3.65 KB 0644
StrictTypesPassTest.php File 1.31 KB 0644
UseStatementPassTest.php File 3.36 KB 0644
ValidClassNamePassTest.php File 10.1 KB 0644
ValidConstructorPassTest.php File 2.68 KB 0644
ValidFunctionNamePassTest.php File 4.78 KB 0644