| @@ 87-102 (lines=16) @@ | ||
| 84 | $manager->inspect($image); |
|
| 85 | } |
|
| 86 | ||
| 87 | public function testRemoveImages() |
|
| 88 | { |
|
| 89 | $containers = ['ubuntu:precise', '69c02692b0c1']; |
|
| 90 | $manager = $this |
|
| 91 | ->getMockBuilder('\Docker\Manager\ImageManager') |
|
| 92 | ->setMethods(['remove']) |
|
| 93 | ->disableOriginalConstructor() |
|
| 94 | ->getMock(); |
|
| 95 | ||
| 96 | $manager->expects($this->exactly(2)) |
|
| 97 | ->method('remove') |
|
| 98 | ->with($this->isInstanceOf('\Docker\Image'), false, false) |
|
| 99 | ->will($this->returnSelf()); |
|
| 100 | ||
| 101 | $manager->removeImages($containers); |
|
| 102 | } |
|
| 103 | ||
| 104 | public function testSearch() |
|
| 105 | { |
|
| @@ 394-409 (lines=16) @@ | ||
| 391 | $manager->removeContainers($containers); |
|
| 392 | } |
|
| 393 | ||
| 394 | public function testForceRemoveContainers() |
|
| 395 | { |
|
| 396 | $containers = ['3360ea744df2', 'a412d121d015']; |
|
| 397 | $manager = $this |
|
| 398 | ->getMockBuilder('\Docker\Manager\ContainerManager') |
|
| 399 | ->setMethods(['remove']) |
|
| 400 | ->disableOriginalConstructor() |
|
| 401 | ->getMock(); |
|
| 402 | ||
| 403 | $manager->expects($this->exactly(2)) |
|
| 404 | ->method('remove') |
|
| 405 | ->with($this->isInstanceOf('\Docker\Container'), false, true) |
|
| 406 | ->will($this->returnSelf()); |
|
| 407 | ||
| 408 | $manager->removeContainers($containers, false, true); |
|
| 409 | } |
|
| 410 | ||
| 411 | public function testTop() |
|
| 412 | { |
|