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
51
51
*/
52
52
private function createConfig ()
53
53
{
54
- $ type = $ this ->options ->offsetExists ('useConfigIni ' ) ? 'ini ' : 'php ' ;
54
+ $ type = $ this ->options ->get ('useConfigIni ' ) ? 'ini ' : 'php ' ;
55
55
56
56
$ getFile = $ this ->options ->get ('templatePath ' ) . '/project/cli/config. ' . $ type ;
57
57
$ 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()
107
107
*/
108
108
private function createConfig ()
109
109
{
110
- $ type = $ this ->options ->offsetExists ('useConfigIni ' ) ? 'ini ' : 'php ' ;
110
+ $ type = $ this ->options ->get ('useConfigIni ' ) ? 'ini ' : 'php ' ;
111
111
112
112
$ getFile = $ this ->options ->get ('templatePath ' ) . '/project/micro/config. ' . $ type ;
113
113
$ 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()
168
168
*/
169
169
private function createConfig ()
170
170
{
171
- $ type = $ this ->options ->offsetExists ('useConfigIni ' ) ? 'ini ' : 'php ' ;
171
+ $ type = $ this ->options ->get ('useConfigIni ' ) ? 'ini ' : 'php ' ;
172
172
173
173
$ getFile = $ this ->options ->get ('templatePath ' ) . '/project/modules/config. ' . $ type ;
174
174
$ 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()
137
137
*/
138
138
private function createConfig ()
139
139
{
140
- $ type = $ this ->options ->offsetExists ('useConfigIni ' ) ? 'ini ' : 'php ' ;
140
+ $ type = $ this ->options ->get ('useConfigIni ' ) ? 'ini ' : 'php ' ;
141
141
142
142
$ getFile = $ this ->options ->get ('templatePath ' ) . '/project/simple/config. ' . $ type ;
143
143
$ 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
39
39
*/
40
40
protected static function _getVersion ()
41
41
{
42
- return [3 , 4 , 5 , 0 , 0 ];
42
+ return [3 , 4 , 6 , 0 , 0 ];
43
43
}
44
44
}
Original file line number Diff line number Diff line change 25
25
$ I ->dontSeeFileFound (app_path ($ path1 ));
26
26
$ I ->runShellCommand ('phalcon project ' . $ projectName1 );
27
27
$ I ->seeFileFound (app_path ($ path1 ));
28
+ $ I ->seeFileFound (app_path ($ path1 . '/app/config/config.php ' ));
28
29
$ I ->deleteDir (app_path ($ path1 ));
29
30
30
31
/**
37
38
$ I ->dontSeeFileFound (app_path ($ path2 ));
38
39
$ I ->runShellCommand ("phalcon project $ projectName2 simple $ projectPath2 " );
39
40
$ I ->seeFileFound (app_path ($ path2 ));
41
+ $ I ->seeFileFound (app_path ($ projectsFolder . '/ ' . $ projectPath2 . '/ ' . $ projectName2 . '/app/config/config.php ' ));
40
42
$ 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