Ejemplo n.º 1
0
 function testHostname()
 {
     $this->assertEquals(PSU::hostname(false, 'foo.plymouth.edu'), 'foo');
     $this->assertEquals(PSU::hostname(false, 'bar'), 'bar');
     $this->assertEquals(PSU::hostname(false, 'cetus.plymouth.edu'), 'cetus');
     $this->assertEquals(PSU::hostname(true, 'cetus.plymouth.edu'), 'capricorn');
     $this->assertEquals(PSU::hostname(true, 'baz.plymouth.edu'), 'baz');
 }
Ejemplo n.º 2
0
 public function __construct($host, $port = 8888)
 {
     $this->server = \PSU::hostname();
     parent::__construct($host, $port);
 }