示例#1
0
 /**
  * testReset method
  *
  * @return void
  */
 public function testReset()
 {
     $config = ['persistent' => true, 'host' => '127.0.0.1', 'protocol' => 'udp', 'port' => 80, 'timeout' => 20];
     $anotherSocket = new Socket($config);
     $anotherSocket->reset();
     $expected = ['persistent' => false, 'host' => 'localhost', 'protocol' => 'tcp', 'port' => 80, 'timeout' => 30];
     $this->assertEquals($expected, $anotherSocket->config(), 'Reset should cause config to return the defaults defined in _defaultConfig');
 }