Example #1
0
 public function testLoad()
 {
     $oossh = $this->getMock('OOSSH\\OOSSH');
     $oossh->expects($this->at(0))->method('add')->with('con1', new \PHPUnit_Framework_Constraint_IsInstanceOf('OOSSH\\SSH2\\Connection'));
     $oossh->expects($this->at(1))->method('setAuthentication')->with('con1', new \PHPUnit_Framework_Constraint_IsInstanceOf('OOSSH\\SSH2\\Authentication\\Password'));
     $oossh->expects($this->at(2))->method('add')->with('con2', new \PHPUnit_Framework_Constraint_IsInstanceOf('OOSSH\\SSH2\\Connection'));
     $oossh->expects($this->at(3))->method('setAuthentication')->with('con2', new \PHPUnit_Framework_Constraint_IsInstanceOf('OOSSH\\SSH2\\Authentication\\Publickey'));
     $this->object->load($oossh);
 }
Example #2
0
 /**
  * @param array $config
  *
  * @return OOSSH
  */
 public function load(array $config)
 {
     $loader = new ArrayLoader($config);
     $loader->load($this);
     return $this;
 }