File tree 5 files changed +51
-27
lines changed
5 files changed +51
-27
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ <?php declare (strict_types=1 );
2
+
3
+ namespace DrupalCodeGenerator \Tests \Generator \Console ;
4
+
5
+ use DrupalCodeGenerator \Command \Console \DcgCommand ;
6
+ use DrupalCodeGenerator \Test \Functional \GeneratorTestBase ;
7
+
8
+ /**
9
+ * Tests console:dcg-command generator.
10
+ */
11
+ final class DcgCommandTest extends GeneratorTestBase {
12
+
13
+ protected string $ fixtureDir = __DIR__ . '/_dcg_command ' ;
14
+
15
+ public function testGenerator (): void {
16
+
17
+ $ input = [
18
+ 'custom:example ' ,
19
+ 'Some description ' ,
20
+ 'example ' ,
21
+ ];
22
+ $ this ->execute (new DcgCommand (), $ input );
23
+
24
+ $ expected_display = <<< 'TXT'
25
+
26
+ Welcome to dcg-command generator!
27
+ –––––––––––––––––––––––––––––––––––
28
+
29
+ Command name [custom:example]:
30
+ ➤
31
+
32
+ Command description:
33
+ ➤
34
+
35
+ Command alias [example]:
36
+ ➤
37
+
38
+ The following directories and files have been created or updated:
39
+ –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
40
+ • custom/Example.php
41
+ • custom/example.twig
42
+
43
+ TXT;
44
+ $ this ->assertDisplay ($ expected_display );
45
+
46
+ $ this ->assertGeneratedFile ('custom/Example.php ' );
47
+ $ this ->assertGeneratedFile ('custom/example.twig ' );
48
+ }
49
+
50
+ }
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 130
130
Select generator
131
131
[0] ..
132
132
[1] Apache virtual host
133
- [2] HTML page
134
- [3] Nginx virtual host
133
+ [2] Nginx virtual host
135
134
➤ 0⏎
136
135
Select generator
137
136
[ 0] ..
You can’t perform that action at this time.
0 commit comments