예제 #1
0
 /**
  * @return Port[]
  */
 public function getPorts()
 {
     $ret = array();
     $port = $this->api->module_port();
     foreach ($port->all(array('lease' => $this->id)) as $port) {
         $ret[] = new Port($port, $this->api);
     }
     return $ret;
 }
예제 #2
0
 function testInsert()
 {
     //Setup
     $value = array('protocol' => 1);
     //not complete
     //Assert
     $client = $this->getMock(self::API_CLIENT);
     $client->expects($this->once())->method('execute')->with($this->equalTo('Port'), $this->equalTo('insert'), $this->equalTo(array('value' => $value)));
     //Do
     $api = new X4BApi($client);
     $api->module_port()->insert($value);
 }