Code Duplication    Length = 13-14 lines in 2 locations

tests/Manager/ContainerManagerTest.php 2 locations

@@ 297-310 (lines=14) @@
294
        }
295
    }
296
297
    public function testExposeFixedPort()
298
    {
299
        $container = new Container(['Image' => 'ubuntu:precise', 'Cmd' => ['/bin/sleep', '1']]);
300
301
        $port = new Port('8888:80/tcp');
302
303
        $container->setExposedPorts($port);
304
305
        $manager = $this->getManager();
306
        $manager->create($container);
307
        $manager->start($container, ['PortBindings' => $port->toSpec()]);
308
309
        $this->assertEquals(8888, $container->getMappedPort(80)->getHostPort());
310
    }
311
312
    public function testExposeRandomPort()
313
    {
@@ 312-324 (lines=13) @@
309
        $this->assertEquals(8888, $container->getMappedPort(80)->getHostPort());
310
    }
311
312
    public function testExposeRandomPort()
313
    {
314
        $container = new Container(['Image' => 'ubuntu:precise', 'Cmd' => ['/bin/sleep', '1']]);
315
316
        $port = new Port('80/tcp');
317
        $container->setExposedPorts($port);
318
319
        $manager = $this->getManager();
320
        $manager->create($container);
321
        $manager->start($container, ['PortBindings' => $port->toSpec()]);
322
323
        $this->assertInternalType('integer', $container->getMappedPort(80)->getHostPort());
324
    }
325
326
    public function testInspect()
327
    {