!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/sms.picotech.app/public_html_old/vendor/plivo/plivo-php/tests/Resources/   drwxr-xr-x
Free 26.31 GB of 117.98 GB (22.3%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Plivo\Tests\Resources;




use 
Plivo\Http\PlivoRequest;
use 
Plivo\Http\PlivoResponse;
use 
Plivo\Tests\BaseTestCase;


/**
 * Class MessageTest
 * @package Plivo\Tests\Resources
 */
class MessageTest extends BaseTestCase {

    public function 
testMessageCreateWithoutSrcPowerpackException()
    {
        
$this->expectPlivoException('Plivo\Exceptions\PlivoValidationException');
        
$body file_get_contents(__DIR__ '/../Mocks/messageSendResponse.json');

        
$this->mock(new PlivoResponse(new PlivoRequest(),200$body));

        
$this->client->messages->create(null, ["+919012345678"], "Test", [], null);

    }

    public function 
testMessageCreateWithSrcPowerpackException()
    {
        
$this->expectPlivoException('Plivo\Exceptions\PlivoValidationException');
        
$body file_get_contents(__DIR__ '/../Mocks/messageSendResponse.json');

        
$this->mock(new PlivoResponse(new PlivoRequest(),200$body));

        
$this->client->messages->create("+919999999999", ["+919012345678"], "Test", [], "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");

    }

    public function 
testMessageCreate()
    {
        
$request = new PlivoRequest(
            
'POST',
            
'Account/MAXXXXXXXXXXXXXXXXXX/Message/',
            [
                
"dst" => "+919012345678",
                
"text" => "Test",
                
"src" => "+919999999999"
            
]);
        
$body file_get_contents(__DIR__ '/../Mocks/messageSendResponse.json');

        
$this->mock(new PlivoResponse($request,200$body));

        
$actual $this->client->messages->create("+919999999999", ["+919012345678"], "Test", [], null);

        
self::assertNotNull($actual);
    }

    public function 
testnewMessageCreate()
    {
        
$request = new PlivoRequest(
            
'POST',
            
'Account/MAXXXXXXXXXXXXXXXXXX/Message/',
            [
                
"dst" => "+919012345678",
                
"text" => "Test",
                
"src" => "+919999999999"
            
]);
        
$body file_get_contents(__DIR__ '/../Mocks/messageSendResponse.json');

        
$this->mock(new PlivoResponse($request,200$body));

        
$actual $this->client->messages->create([ "src" => "+919999999999""dst" => "+919012345678""text"  =>"Test"]);

        
self::assertNotNull($actual);
    }

    public function 
testMessageGet()
    {
        
$messageUuid "5b40a428-bfc7-4daf-9d06-726c558bf3b8";
        
$request = new PlivoRequest(
            
'GET',
            
'Account/MAXXXXXXXXXXXXXXXXXX/Message/'.$messageUuid.'/',
            []);
        
$body file_get_contents(__DIR__ '/../Mocks/messageGetResponse.json');

        
$this->mock(new PlivoResponse($request,200$body));

        
$actual $this->client->messages->get($messageUuid);

        
$this->assertRequest($request);

        
self::assertNotNull($actual);

        
self::assertEquals($actual->messageUuid$messageUuid);
    }

    public function 
testMessageGetwithPowerpack()
    {
        
$messageUuid "5b40a428-bfc7-4daf-9d06-726c558bf3b8";
        
$expected_ppk "15c01cc2-4b9f-4d3b-bd15-3c4b38984cc4";
        
$request = new PlivoRequest(
            
'GET',
            
'Account/MAXXXXXXXXXXXXXXXXXX/Message/'.$messageUuid.'/',
            []);
        
$body file_get_contents(__DIR__ '/../Mocks/messageGetResponse.json');

        
$this->mock(new PlivoResponse($request,200$body));

        
$actual $this->client->messages->get($messageUuid);

        
self::assertEquals($actual->powerpackID$expected_ppk);
    }
    public function 
testMediaList()
    {
        
$messageUuid "5b40a428-bfc7-4daf-9d06-726c558bf3b8";
        
$request = new PlivoRequest(
            
'GET',
            
'Account/MAXXXXXXXXXXXXXXXXXX/Message/'.$messageUuid.'/',
            []);
        
$body file_get_contents(__DIR__ '/../Mocks/messageGetResponse.json');

        
$this->mock(new PlivoResponse($request,200$body));

        
$actual $this->client->messages->get($messageUuid);
        
$request = new PlivoRequest(
            
'GET',
            
'Account/MAXXXXXXXXXXXXXXXXXX/Message/'.$messageUuid.'/Media/',
            []);
        
$body file_get_contents(__DIR__ '/../Mocks/mediaListResponse.json');

        
$this->mock(new PlivoResponse($request,200$body));

        
$mediaList $actual->listMedia();
        
self::assertNotNull($mediaList);

    }
    
    function 
testMessageList()
    {
        
$request = new PlivoRequest(
            
'Get',
            
'Account/MAXXXXXXXXXXXXXXXXXX/Message/',
            []);
        
$body file_get_contents(__DIR__ '/../Mocks/messageListResponse.json');
        
        
$this->mock(new PlivoResponse($request,202$body));
        
        
$actual $this->client->messages->list;
        
        
$this->assertRequest($request);
        
        
self::assertNotNull($actual);
    }

}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0074 ]--