This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | use AspectMock\Test as test; |
||
3 | |||
4 | class DockerTest extends \Codeception\TestCase\Test |
||
5 | { |
||
6 | protected $container; |
||
7 | |||
8 | /** |
||
9 | * @var \AspectMock\Proxy\ClassProxy |
||
10 | */ |
||
11 | protected $baseDocker; |
||
12 | |||
13 | protected function _before() |
||
14 | { |
||
15 | $this->baseDocker = test::double('Robo\Task\Docker\Base', [ |
||
16 | 'output' => new \Symfony\Component\Console\Output\NullOutput(), |
||
17 | 'logger' => new \Psr\Log\NullLogger(), |
||
18 | ]); |
||
19 | } |
||
20 | // tests |
||
21 | View Code Duplication | public function testDockerBuild() |
|
0 ignored issues
–
show
|
|||
22 | { |
||
23 | $docker = test::double('Robo\Task\Docker\Build', ['executeCommand' => null, 'getConfig' => new \Robo\Config(), 'logger' => new \Psr\Log\NullLogger()]); |
||
0 ignored issues
–
show
The class
Robo\Config has been deprecated with message: Use \Robo\Config\Config
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead. ![]() |
|||
24 | |||
25 | (new \Robo\Task\Docker\Build())->run(); |
||
26 | $docker->verifyInvoked('executeCommand', ['docker build .']); |
||
27 | |||
28 | (new \Robo\Task\Docker\Build())->tag('something')->run(); |
||
29 | $docker->verifyInvoked('executeCommand', ['docker build -t something .']); |
||
30 | |||
31 | (new \Robo\Task\Docker\Build())->enableBuildKit()->tag('something')->run(); |
||
32 | $docker->verifyInvoked('executeCommand', ['DOCKER_BUILDKIT=1 docker build -t something .']); |
||
33 | } |
||
34 | |||
35 | View Code Duplication | public function testDockerCommit() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
36 | { |
||
37 | $docker = test::double('Robo\Task\Docker\Commit', ['executeCommand' => null, 'getConfig' => new \Robo\Config(), 'logger' => new \Psr\Log\NullLogger()]); |
||
0 ignored issues
–
show
The class
Robo\Config has been deprecated with message: Use \Robo\Config\Config
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead. ![]() |
|||
38 | |||
39 | (new \Robo\Task\Docker\Commit('cid'))->run(); |
||
40 | $docker->verifyInvoked('executeCommand', ['docker commit cid ']); |
||
41 | |||
42 | (new \Robo\Task\Docker\Commit('cid'))->name('somename')->run(); |
||
43 | $docker->verifyInvoked('executeCommand', ['docker commit cid somename ']); |
||
44 | } |
||
45 | |||
46 | View Code Duplication | public function testDockerExec() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
47 | { |
||
48 | $docker = test::double('Robo\Task\Docker\Exec', ['executeCommand' => null, 'getConfig' => new \Robo\Config(), 'logger' => new \Psr\Log\NullLogger()]); |
||
0 ignored issues
–
show
The class
Robo\Config has been deprecated with message: Use \Robo\Config\Config
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead. ![]() |
|||
49 | |||
50 | (new \Robo\Task\Docker\Exec('cid'))->run(); |
||
51 | $docker->verifyInvoked('executeCommand', ['docker exec cid ']); |
||
52 | |||
53 | (new \Robo\Task\Docker\Exec('cid'))->exec('pwd')->run(); |
||
54 | $docker->verifyInvoked('executeCommand', ['docker exec cid pwd']); |
||
55 | } |
||
56 | |||
57 | View Code Duplication | public function testDockerPull() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
58 | { |
||
59 | $docker = test::double('Robo\Task\Docker\Pull', ['executeCommand' => null, 'getConfig' => new \Robo\Config(), 'logger' => new \Psr\Log\NullLogger()]); |
||
0 ignored issues
–
show
The class
Robo\Config has been deprecated with message: Use \Robo\Config\Config
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead. ![]() |
|||
60 | |||
61 | (new \Robo\Task\Docker\Pull('image'))->run(); |
||
62 | $docker->verifyInvoked('executeCommand', ['docker pull image ']); |
||
63 | } |
||
64 | |||
65 | View Code Duplication | public function testDockerRemove() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
66 | { |
||
67 | $docker = test::double('Robo\Task\Docker\Remove', ['executeCommand' => null, 'getConfig' => new \Robo\Config(), 'logger' => new \Psr\Log\NullLogger()]); |
||
0 ignored issues
–
show
The class
Robo\Config has been deprecated with message: Use \Robo\Config\Config
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead. ![]() |
|||
68 | |||
69 | (new \Robo\Task\Docker\Remove('container'))->run(); |
||
70 | $docker->verifyInvoked('executeCommand', ['docker rm container ']); |
||
71 | } |
||
72 | |||
73 | View Code Duplication | public function testDockerRun() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
74 | { |
||
75 | $docker = test::double('Robo\Task\Docker\Run', ['executeCommand' => null, 'getConfig' => new \Robo\Config(), 'logger' => new \Psr\Log\NullLogger(), 'getUniqId' => '12345']); |
||
0 ignored issues
–
show
The class
Robo\Config has been deprecated with message: Use \Robo\Config\Config
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead. ![]() |
|||
76 | |||
77 | (new \Robo\Task\Docker\Run('cid'))->tmpDir('/tmp')->run(); |
||
78 | $docker->verifyInvoked('executeCommand', ['docker run -i --cidfile /tmp/docker_12345.cid cid']); |
||
79 | |||
80 | (new \Robo\Task\Docker\Run('cid'))->tmpDir('/tmp')->exec('pwd')->run(); |
||
81 | $docker->verifyInvoked('executeCommand', ['docker run -i --cidfile /tmp/docker_12345.cid cid pwd']); |
||
82 | } |
||
83 | |||
84 | View Code Duplication | public function testDockerStart() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
85 | { |
||
86 | $docker = test::double('Robo\Task\Docker\Start', ['executeCommand' => null, 'getConfig' => new \Robo\Config(), 'logger' => new \Psr\Log\NullLogger()]); |
||
0 ignored issues
–
show
The class
Robo\Config has been deprecated with message: Use \Robo\Config\Config
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead. ![]() |
|||
87 | |||
88 | (new \Robo\Task\Docker\Start('cid'))->run(); |
||
89 | $docker->verifyInvoked('executeCommand', ['docker start cid']); |
||
90 | } |
||
91 | |||
92 | View Code Duplication | public function testDockerStop() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
93 | { |
||
94 | $docker = test::double('Robo\Task\Docker\Stop', ['executeCommand' => null, 'getConfig' => new \Robo\Config(), 'logger' => new \Psr\Log\NullLogger()]); |
||
0 ignored issues
–
show
The class
Robo\Config has been deprecated with message: Use \Robo\Config\Config
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead. ![]() |
|||
95 | |||
96 | (new \Robo\Task\Docker\Stop('cid'))->run(); |
||
97 | $docker->verifyInvoked('executeCommand', ['docker stop cid']); |
||
98 | } |
||
99 | } |
||
100 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.