@@ -54,6 +54,118 @@ public function test00() {
5454 $ this ->cleanupTestResources ($ path );
5555 }
5656
57+ /**
58+ * @test
59+ */
60+ public function testExtendedToolbar () {
61+ $ ns = 'TestTheme \\ExtendedToolbar ' ;
62+ $ name = 'ExtendedToolbarTheme ' ;
63+ $ path = ROOT_PATH . DS . str_replace ('\\' , DS , $ ns );
64+
65+ $ this ->cleanupTestResources ($ path );
66+
67+ $ output = $ this ->executeSingleCommand (new CreateVuetifyThemeCommand (), [], [
68+ '1 ' ,
69+ $ name ,
70+ $ ns
71+ ]);
72+
73+ $ expectedFiles = [$ name . '.php ' , 'AsideSection.php ' , 'FooterSection.php ' , 'HeaderSection.php ' , 'HeadSection.php ' ];
74+
75+ foreach ($ expectedFiles as $ fileName ) {
76+ $ filePath = $ path . DS . $ fileName ;
77+ $ this ->assertTrue (file_exists ($ filePath ), "File not found: " . $ filePath );
78+ require_once $ filePath ;
79+ $ this ->assertTrue (class_exists ($ ns .'\\' .explode ('. ' , $ fileName )[0 ]), "Class not found: " . $ ns .'\\' .explode ('. ' , $ fileName )[0 ]);
80+ }
81+
82+ $ this ->cleanupTestResources ($ path );
83+ }
84+
85+ /**
86+ * @test
87+ */
88+ public function testSystemBar () {
89+ $ ns = 'TestTheme \\SystemBar ' ;
90+ $ name = 'SystemBarTheme ' ;
91+ $ path = ROOT_PATH . DS . str_replace ('\\' , DS , $ ns );
92+
93+ $ this ->cleanupTestResources ($ path );
94+
95+ $ output = $ this ->executeSingleCommand (new CreateVuetifyThemeCommand (), [], [
96+ '2 ' ,
97+ $ name ,
98+ $ ns
99+ ]);
100+
101+ $ expectedFiles = [$ name . '.php ' , 'AsideSection.php ' , 'FooterSection.php ' , 'HeaderSection.php ' , 'HeadSection.php ' ];
102+
103+ foreach ($ expectedFiles as $ fileName ) {
104+ $ filePath = $ path . DS . $ fileName ;
105+ $ this ->assertTrue (file_exists ($ filePath ), "File not found: " . $ filePath );
106+ require_once $ filePath ;
107+ $ this ->assertTrue (class_exists ($ ns .'\\' .explode ('. ' , $ fileName )[0 ]), "Class not found: " . $ ns .'\\' .explode ('. ' , $ fileName )[0 ]);
108+ }
109+
110+ $ this ->cleanupTestResources ($ path );
111+ }
112+
113+ /**
114+ * @test
115+ */
116+ public function testInbox () {
117+ $ ns = 'TestTheme \\Inbox ' ;
118+ $ name = 'InboxTheme ' ;
119+ $ path = ROOT_PATH . DS . str_replace ('\\' , DS , $ ns );
120+
121+ $ this ->cleanupTestResources ($ path );
122+
123+ $ output = $ this ->executeSingleCommand (new CreateVuetifyThemeCommand (), [], [
124+ '3 ' ,
125+ $ name ,
126+ $ ns
127+ ]);
128+
129+ $ expectedFiles = [$ name . '.php ' , 'AsideSection.php ' , 'FooterSection.php ' , 'HeaderSection.php ' , 'HeadSection.php ' ];
130+
131+ foreach ($ expectedFiles as $ fileName ) {
132+ $ filePath = $ path . DS . $ fileName ;
133+ $ this ->assertTrue (file_exists ($ filePath ), "File not found: " . $ filePath );
134+ require_once $ filePath ;
135+ $ this ->assertTrue (class_exists ($ ns .'\\' .explode ('. ' , $ fileName )[0 ]), "Class not found: " . $ ns .'\\' .explode ('. ' , $ fileName )[0 ]);
136+ }
137+
138+ $ this ->cleanupTestResources ($ path );
139+ }
140+
141+ /**
142+ * @test
143+ */
144+ public function testSideNavigation () {
145+ $ ns = 'TestTheme \\SideNavigation ' ;
146+ $ name = 'SideNavigationTheme ' ;
147+ $ path = ROOT_PATH . DS . str_replace ('\\' , DS , $ ns );
148+
149+ $ this ->cleanupTestResources ($ path );
150+
151+ $ output = $ this ->executeSingleCommand (new CreateVuetifyThemeCommand (), [], [
152+ '4 ' ,
153+ $ name ,
154+ $ ns
155+ ]);
156+
157+ $ expectedFiles = [$ name . '.php ' , 'AsideSection.php ' , 'FooterSection.php ' , 'HeaderSection.php ' , 'HeadSection.php ' ];
158+
159+ foreach ($ expectedFiles as $ fileName ) {
160+ $ filePath = $ path . DS . $ fileName ;
161+ $ this ->assertTrue (file_exists ($ filePath ), "File not found: " . $ filePath );
162+ require_once $ filePath ;
163+ $ this ->assertTrue (class_exists ($ ns .'\\' .explode ('. ' , $ fileName )[0 ]), "Class not found: " . $ ns .'\\' .explode ('. ' , $ fileName )[0 ]);
164+ }
165+
166+ $ this ->cleanupTestResources ($ path );
167+ }
168+
57169 /**
58170 * Deletes all resources created by a test in the specified path
59171 *
0 commit comments