mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-07 04:59:36 +00:00
32 lines
556 B
PHP
32 lines
556 B
PHP
<?php
|
|
|
|
namespace Tests\Unit;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use Redis;
|
|
|
|
class ExampleTest extends TestCase {
|
|
/**
|
|
* A basic test example.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function testBasicTest() {
|
|
try{
|
|
//create redis instance
|
|
$redis = new Redis();
|
|
//connect with server and port
|
|
$redis->connect('localhost', 6379);
|
|
//set value
|
|
$redis->set('website', 'www.phpflow.com');
|
|
//get value
|
|
$website = $redis->get('website');
|
|
//print www.phpflow.com
|
|
echo $website;
|
|
|
|
}catch(Exception $ex){
|
|
echo $ex->getMessage();
|
|
}
|
|
}
|
|
}
|