!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/smabpro.picotech.app/public_html/vendor/srmklive/paypal/tests/Unit/Adapter/   drwxr-xr-x
Free 29.38 GB of 117.98 GB (24.9%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Srmklive\PayPal\Tests\Unit\Adapter;

use 
PHPUnit\Framework\TestCase;
use 
Srmklive\PayPal\Tests\MockClientClasses;
use 
Srmklive\PayPal\Tests\MockRequestPayloads;
use 
Srmklive\PayPal\Tests\MockResponsePayloads;

class 
SubscriptionsTest extends TestCase
{
    use 
MockClientClasses;
    use 
MockRequestPayloads;
    use 
MockResponsePayloads;

    
/** @test */
    
public function it_can_create_a_subscription()
    {
        
$expectedResponse $this->mockCreateSubscriptionResponse();

        
$expectedParams $this->mockCreateSubscriptionParams();

        
$expectedMethod 'createSubscription';

        
$mockClient $this->mock_client($expectedResponse$expectedMethodtrue);

        
$mockClient->setApiCredentials($this->getMockCredentials());
        
$mockClient->getAccessToken();

        
$this->assertEquals($expectedResponse$mockClient->{$expectedMethod}($expectedParams));
    }

    
/** @test */
    
public function it_can_update_a_subscription()
    {
        
$expectedResponse '';

        
$expectedParams $this->mockUpdateSubscriptionParams();

        
$expectedMethod 'updateSubscription';

        
$mockClient $this->mock_client($expectedResponse$expectedMethodtrue);

        
$mockClient->setApiCredentials($this->getMockCredentials());
        
$mockClient->getAccessToken();

        
$this->assertEquals($expectedResponse$mockClient->{$expectedMethod}('I-BW452GLLEP1G'$expectedParams));
    }

    
/** @test */
    
public function it_can_show_details_for_a_subscription()
    {
        
$expectedResponse $this->mockGetSubscriptionDetailsResponse();

        
$expectedMethod 'showSubscriptionDetails';

        
$mockClient $this->mock_client($expectedResponse$expectedMethodtrue);

        
$mockClient->setApiCredentials($this->getMockCredentials());
        
$mockClient->getAccessToken();

        
$this->assertEquals($expectedResponse$mockClient->{$expectedMethod}('I-BW452GLLEP1G'));
    }

    
/** @test */
    
public function it_can_activate_a_subscription()
    {
        
$expectedResponse '';

        
$expectedMethod 'activateSubscription';

        
$mockClient $this->mock_client($expectedResponse$expectedMethodtrue);

        
$mockClient->setApiCredentials($this->getMockCredentials());
        
$mockClient->getAccessToken();

        
$this->assertEquals($expectedResponse$mockClient->{$expectedMethod}('I-BW452GLLEP1G''Reactivating the subscription'));
    }

    
/** @test */
    
public function it_can_cancel_a_subscription()
    {
        
$expectedResponse '';

        
$expectedMethod 'cancelSubscription';

        
$mockClient $this->mock_client($expectedResponse$expectedMethodtrue);

        
$mockClient->setApiCredentials($this->getMockCredentials());
        
$mockClient->getAccessToken();

        
$this->assertEquals($expectedResponse$mockClient->{$expectedMethod}('I-BW452GLLEP1G''Not satisfied with the service'));
    }

    
/** @test */
    
public function it_can_suspend_a_subscription()
    {
        
$expectedResponse '';

        
$expectedMethod 'suspendSubscription';

        
$mockClient $this->mock_client($expectedResponse$expectedMethodtrue);

        
$mockClient->setApiCredentials($this->getMockCredentials());
        
$mockClient->getAccessToken();

        
$this->assertEquals($expectedResponse$mockClient->{$expectedMethod}('I-BW452GLLEP1G''Item out of stock'));
    }

    
/** @test */
    
public function it_can_capture_payment_for_a_subscription()
    {
        
$expectedResponse '';

        
$expectedMethod 'captureSubscriptionPayment';

        
$mockClient $this->mock_client($expectedResponse$expectedMethodtrue);

        
$mockClient->setApiCredentials($this->getMockCredentials());
        
$mockClient->getAccessToken();

        
$this->assertEquals($expectedResponse$mockClient->{$expectedMethod}('I-BW452GLLEP1G''Charging as the balance reached the limit'100));
    }

    
/** @test */
    
public function it_can_update_quantity_or_product_for_a_subscription()
    {
        
$expectedResponse $this->mockUpdateSubscriptionItemsResponse();

        
$expectedParams $this->mockUpdateSubscriptionItemsParams();

        
$expectedMethod 'reviseSubscription';

        
$mockClient $this->mock_client($expectedResponse$expectedMethodtrue);

        
$mockClient->setApiCredentials($this->getMockCredentials());
        
$mockClient->getAccessToken();

        
$this->assertEquals($expectedResponse$mockClient->{$expectedMethod}('I-BW452GLLEP1G'$expectedParams));
    }

    
/** @test */
    
public function it_can_list_transactions_for_a_subscription()
    {
        
$expectedResponse $this->mockListSubscriptionTransactionsResponse();

        
$expectedMethod 'listSubscriptionTransactions';

        
$mockClient $this->mock_client($expectedResponse$expectedMethodtrue);

        
$mockClient->setApiCredentials($this->getMockCredentials());
        
$mockClient->getAccessToken();

        
$this->assertEquals($expectedResponse$mockClient->{$expectedMethod}('I-BW452GLLEP1G''2018-01-21T07:50:20.940Z''2018-08-22T07:50:20.940Z'));
    }
}

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