Conditions | 3 |
Paths | 4 |
Total Lines | 29 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
12 | public function testExecute() { |
||
13 | |||
14 | $command = new BuildIndexesCommand(); |
||
15 | $command->setManager($this->manager); |
||
16 | |||
17 | $indexes = $this->testRepo->listIndexes(); |
||
18 | $base = ['_id_']; |
||
19 | foreach ($indexes as $i) { |
||
20 | $this->assertContains($i['name'], $base); |
||
21 | } |
||
22 | |||
23 | $app = new Application($this->k); |
||
24 | |||
25 | $app->add($command); |
||
26 | |||
27 | $tester = new CommandTester($command); |
||
28 | |||
29 | $tester->execute(array( |
||
30 | '-vvv' => null, |
||
31 | )); |
||
32 | |||
33 | $indexes = $this->testRepo->listIndexes(); |
||
34 | $base = ['_id_', 'bar_-1']; |
||
35 | |||
36 | foreach ($indexes as $i) { |
||
37 | $this->assertContains($i['name'], $base); |
||
38 | } |
||
39 | |||
40 | } |
||
41 | } |