示例#1
0
 /**
  * @param Port $ports
  *
  * @return Container
  */
 public function setExposedPorts($ports)
 {
     if ($ports instanceof PortSpecInterface) {
         $this->config['ExposedPorts'] = $ports->toExposedPorts();
     } else {
         $this->config['ExposedPorts'] = $ports;
     }
     return $this;
 }
示例#2
0
 /**
  * @dataProvider provider
  */
 public function testToExposedPorts($parsed, $spec, $exposed, $input)
 {
     $port = new Port($input);
     $this->assertEquals($exposed, $port->toExposedPorts());
 }