@@ 49-61 (lines=13) @@ | ||
46 | /** |
|
47 | * Test Command execute, empty directory |
|
48 | */ |
|
49 | public function testExecuteEmptyDirectory() |
|
50 | { |
|
51 | $this->commandTester->execute([ |
|
52 | 'command' => $this->command->getName(), |
|
53 | 'pattern' => 'pattern', |
|
54 | 'directory' => __DIR__ . '/empty_directory' |
|
55 | ]); |
|
56 | ||
57 | $this->assertEquals( |
|
58 | "No results where found.\n", |
|
59 | $this->commandTester->getDisplay() |
|
60 | ); |
|
61 | } |
|
62 | ||
63 | /** |
|
64 | * Test Command execute |
|
@@ 66-77 (lines=12) @@ | ||
63 | /** |
|
64 | * Test Command execute |
|
65 | */ |
|
66 | public function testExecute() |
|
67 | { |
|
68 | $this->commandTester->execute([ |
|
69 | 'command' => $this->command->getName(), |
|
70 | 'pattern' => 'pattern', |
|
71 | 'directory' => __DIR__ . '/../Fixtures/directory' |
|
72 | ]); |
|
73 | $this->assertRegExp( |
|
74 | '/file_1|file_3/', |
|
75 | $this->commandTester->getDisplay() |
|
76 | ); |
|
77 | } |
|
78 | ||
79 | /** |
|
80 | * Test Command execute, Extension set |
|
@@ 82-91 (lines=10) @@ | ||
79 | /** |
|
80 | * Test Command execute, Extension set |
|
81 | */ |
|
82 | public function testExecuteExtensionSet() |
|
83 | { |
|
84 | $this->commandTester->execute([ |
|
85 | 'command' => $this->command->getName(), |
|
86 | 'pattern' => 'pattern', |
|
87 | 'directory' => __DIR__ . '/../Fixtures/directory', |
|
88 | '--extension' => 'txt' |
|
89 | ]); |
|
90 | $this->assertEquals("file_3.txt\n", $this->commandTester->getDisplay()); |
|
91 | } |
|
92 | ||
93 | /** |
|
94 | * Get Mock Container |