!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/docs/   drwxr-xr-x
Free 13.38 GB of 61.93 GB (21.6%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     annotaciones_docsTest.php (2.26 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace rest\tests\docs;

use 
rest\docs\anotaciones_docs;

class 
annotaciones_docsTest extends \PHPUnit_Framework_TestCase
{

    
/**
     * @return anotaciones_docs
     */
    
protected function getInstancia()
    {
        return new 
anotaciones_docs('tests/docs/clase_anotada_ejemplo.php');
    }

    public function 
testConstructor()
    {
        
$this->getInstancia();
        
$this->assertTrue(true);
    }

    public function 
testDescripcionClase()
    {
        
//la descripcion tiene espacios y algun chirimbolo raro,
        //saltos de linea-> se limipian espacios
        
$a $this->getInstancia();
        
$this->assertTrue($a->get_descripcion_clase() == 'descripcion clase jk %%');
    }

    public function 
testGetMetodos()
    {
        
$a $this->getInstancia();
        
$metodos $a->get_metodos();

        
$this->assertEquals('get'$metodos[0]['nombre']);
        
$this->assertEquals('id_persona'$metodos[0]['parametros'][0]);
    }

    public function 
testParametrosMetodos()
    {
        
$a $this->getInstancia();
        
$metodos $a->get_metodos();
        
$params_query $a->get_parametros_metodo($metodos[0], 'query');

        
$this->assertEquals(3count($params_query));

        
$param_q1 $params_query[0];

        
// @param_query $juego string nombre del juego
        
$this->assertEquals('query'$param_q1['paramType']);
        
$this->assertEquals('juego'$param_q1['name']);
        
$this->assertEquals('string'$param_q1['type']);
        
$this->assertEquals('nombre del juego'$param_q1['description']);

        
$params_body $a->get_parametros_metodo($metodos[0], 'body');
        
$this->assertEquals(1count($params_body));

        
//@param_body $limit integer Limitar a esta cantidad de registros
        
$params_body1 $params_body[0];
        
$this->assertEquals('body'$params_body1['paramType']);
        
$this->assertEquals('limit'$params_body1['name']);
        
$this->assertEquals('integer'$params_body1['type']);
        
$this->assertEquals('Limitar a esta cantidad de registros'$params_body1['description']);
    }

    public function 
testErroresMetodos()
    {
        
$a $this->getInstancia();
        
$metodos $a->get_metodos();
        
$errores $a->get_errores_metodo($metodos[0]);

        
$this->assertEquals(2count($errores));
        
$this->assertEquals('404'$errores[0]['code']);
        
$this->assertEquals('No se pudo encontrar a la persona'$errores[0]['message']);

        
$this->assertEquals('400'$errores[1]['code']);
        
$this->assertEmpty($errores[1]['message']);
    }
}
 

:: 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.5325 ]--