File tree Expand file tree Collapse file tree 6 files changed +19
-5
lines changed Expand file tree Collapse file tree 6 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ class Cli extends ProjectBuilder
5151 */
5252 private function createConfig ()
5353 {
54- $ type = $ this ->options ->offsetExists ('useConfigIni ' ) ? 'ini ' : 'php ' ;
54+ $ type = $ this ->options ->get ('useConfigIni ' ) ? 'ini ' : 'php ' ;
5555
5656 $ getFile = $ this ->options ->get ('templatePath ' ) . '/project/cli/config. ' . $ type ;
5757 $ putFile = $ this ->options ->get ('projectPath ' ) . 'app/config/config. ' . $ type ;
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ private function createIndexViewFiles()
107107 */
108108 private function createConfig ()
109109 {
110- $ type = $ this ->options ->offsetExists ('useConfigIni ' ) ? 'ini ' : 'php ' ;
110+ $ type = $ this ->options ->get ('useConfigIni ' ) ? 'ini ' : 'php ' ;
111111
112112 $ getFile = $ this ->options ->get ('templatePath ' ) . '/project/micro/config. ' . $ type ;
113113 $ putFile = $ this ->options ->get ('projectPath ' ) . 'app/config/config. ' . $ type ;
Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ private function createIndexViewFiles()
168168 */
169169 private function createConfig ()
170170 {
171- $ type = $ this ->options ->offsetExists ('useConfigIni ' ) ? 'ini ' : 'php ' ;
171+ $ type = $ this ->options ->get ('useConfigIni ' ) ? 'ini ' : 'php ' ;
172172
173173 $ getFile = $ this ->options ->get ('templatePath ' ) . '/project/modules/config. ' . $ type ;
174174 $ putFile = $ this ->options ->get ('projectPath ' ) . 'app/config/config. ' . $ type ;
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ private function createIndexViewFiles()
137137 */
138138 private function createConfig ()
139139 {
140- $ type = $ this ->options ->offsetExists ('useConfigIni ' ) ? 'ini ' : 'php ' ;
140+ $ type = $ this ->options ->get ('useConfigIni ' ) ? 'ini ' : 'php ' ;
141141
142142 $ getFile = $ this ->options ->get ('templatePath ' ) . '/project/simple/config. ' . $ type ;
143143 $ putFile = $ this ->options ->get ('projectPath ' ) . 'app/config/config. ' . $ type ;
Original file line number Diff line number Diff line change @@ -39,6 +39,6 @@ class Version extends PhVersion
3939 */
4040 protected static function _getVersion ()
4141 {
42- return [3 , 4 , 5 , 0 , 0 ];
42+ return [3 , 4 , 6 , 0 , 0 ];
4343 }
4444}
Original file line number Diff line number Diff line change 2525$ I ->dontSeeFileFound (app_path ($ path1 ));
2626$ I ->runShellCommand ('phalcon project ' . $ projectName1 );
2727$ I ->seeFileFound (app_path ($ path1 ));
28+ $ I ->seeFileFound (app_path ($ path1 . '/app/config/config.php ' ));
2829$ I ->deleteDir (app_path ($ path1 ));
2930
3031/**
3738$ I ->dontSeeFileFound (app_path ($ path2 ));
3839$ I ->runShellCommand ("phalcon project $ projectName2 simple $ projectPath2 " );
3940$ I ->seeFileFound (app_path ($ path2 ));
41+ $ I ->seeFileFound (app_path ($ projectsFolder . '/ ' . $ projectPath2 . '/ ' . $ projectName2 . '/app/config/config.php ' ));
4042$ I ->deleteDir (app_path ($ path2 ));
43+
44+ /**
45+ * Case 3 - ini config file
46+ */
47+ $ projectName3 = 'project-tests3 ' ;
48+ $ path3 = $ projectsFolder . '/ ' . $ projectName3 ;
49+
50+ $ I ->dontSeeFileFound (app_path ($ path3 ));
51+ $ I ->runShellCommand ('phalcon project ' . $ projectName3 . ' --use-config-ini ' );
52+ $ I ->seeFileFound (app_path ($ path3 ));
53+ $ I ->seeFileFound (app_path ($ path3 . '/app/config/config.ini ' ));
54+ $ I ->deleteDir (app_path ($ path3 ));
You can’t perform that action at this time.
0 commit comments