!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/apex_tdfonline/php/lib/rest/tests/http/   drwxr-xr-x
Free 13.44 GB of 61.93 GB (21.71%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     respuesta_restTest.php (1.46 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * Created by IntelliJ IDEA.
 * User: alejandro
 * Date: 2/18/14
 * Time: 12:39 PM
 */

namespace rest\tests\http;

use 
rest\http\respuesta_rest;

class 
respuesta_restTest extends \PHPUnit_Framework_TestCase
{


    public function 
testGet()
    {
        
$data = array(1);
        
$r = new respuesta_rest();
        
$r->get($data);

        
$this->assertEquals(200$r->get_status());
        
$this->assertEquals($data$r->get_data());
    }

    
/**
     * @expectedException rest\lib\rest_error
     */
    
public function testGetNotFound()
    {
        
$data false;
        
$r = new respuesta_rest();
        
$r->get($data);
    }

    
/**
     * @expectedException rest\lib\rest_error
     */
    
public function testNotFound()
    {
        
$r = new respuesta_rest();
        
$r->not_found("mje");
    }

    public function 
testPutOK()
    {
        
$errores false;
        
$r = new respuesta_rest();
        
$r->put();
        
$this->assertEquals(204$r->get_status());
        
$this->assertEmpty($r->get_data());
    }

    public function 
testDeleteOK()
    {
        
$r = new respuesta_rest();
        
$r->delete();
        
$this->assertEquals(204$r->get_status());
        
$this->assertEmpty($r->get_data());
    }


    public function 
testRedirect()
    {
        
$r = new respuesta_rest();
        
$r->redirect('hola');
        
$this->assertArrayHasKey('Location'$r->headers);
        
$this->assertEquals($r->headers['Location'], 'hola');
    }

    public function 
testErrorNegocio(){
        
$r = new respuesta_rest();
        
$error = array('error' => 'e');
        
$r->error_negocio($error);
        
$this->assertEquals(400$r->get_status());
        
$this->assertEquals($error$r->get_data());
    }
}
 

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.5005 ]--