/** * @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; }
/** * @dataProvider provider */ public function testToExposedPorts($parsed, $spec, $exposed, $input) { $port = new Port($input); $this->assertEquals($exposed, $port->toExposedPorts()); }