Conditions | 2 |
Paths | 2 |
Total Lines | 25 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | public function testExecute($compress) |
||
33 | { |
||
34 | $fileExt = $compress ? 'zip' : 'sql'; |
||
35 | $path = $this->getFixturesDir() . '/test-dump.' . $fileExt; |
||
36 | |||
37 | $exitCode = $this->tester->run( |
||
38 | array( |
||
39 | 'command' => ImportCommand::COMMAND_NAME, |
||
40 | 'file' => $path, |
||
41 | ), |
||
42 | array( |
||
43 | 'verbosity' => OutputInterface::VERBOSITY_DEBUG |
||
44 | ) |
||
45 | ); |
||
46 | |||
47 | $display = trim($this->tester->getDisplay()); |
||
48 | |||
49 | $this->assertEquals(0, $exitCode, $display); |
||
50 | |||
51 | $this->assertRegExp( |
||
52 | '/^Database successfully imported!$/', |
||
53 | $display, |
||
54 | 'Wrong output of import command detected.' |
||
55 | ); |
||
56 | } |
||
57 | |||
69 |