Conditions | 1 |
Paths | 1 |
Total Lines | 30 |
Code Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | public function testExecute() |
||
28 | { |
||
29 | $exitCode = $this->tester->run( |
||
30 | array( |
||
31 | 'command' => SyncCommand::COMMAND_NAME |
||
32 | ), |
||
33 | array( |
||
34 | 'verbosity' => OutputInterface::VERBOSITY_DEBUG |
||
35 | ) |
||
36 | ); |
||
37 | |||
38 | $display = trim($this->tester->getDisplay()); |
||
39 | |||
40 | $this->assertEquals(0, $exitCode, $display); |
||
41 | |||
42 | $this->assertRegExp( |
||
43 | '/Finished in [0-9\.]+ seconds!/', |
||
44 | $display, |
||
45 | 'Wrong output of sync:db command detected.' |
||
46 | ); |
||
47 | |||
48 | $dst = $this->tmpDir . '/dst'; |
||
49 | $this->assertTrue( |
||
50 | file_exists($dst), |
||
51 | sprintf( |
||
52 | 'Folder `%s` does not existing. I guess it did not sync.', |
||
53 | $dst |
||
54 | ) |
||
55 | ); |
||
56 | } |
||
57 | } |
||
58 |