Skip to content

Commit d979d35

Browse files
authored
Merge pull request #1344 from phalcon/3.4.x
3.4.5
2 parents 3ffcfd3 + f534823 commit d979d35

File tree

6 files changed

+45
-10
lines changed

6 files changed

+45
-10
lines changed

.travis.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,3 @@ script:
7070
- vendor/bin/codecept run functional -v
7171
- vendor/bin/codecept run console -v
7272
- '[[ "$PHP_MAJOR" == "5" ]] || vendor/bin/phpstan analyse -l 5 -c phpstan.neon scripts -v'
73-
74-
notifications:
75-
email:
76-
recipients:
77-
78-
on_success: change
79-
on_failure: always

phalcon.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
@echo off
22

33
set PTOOLSPATH=%~dp0
4-
php %PTOOLSPATH%phalcon.php %*
4+
php %PTOOLSPATH%phalcon %*

scripts/Phalcon/Commands/Builtin/Project.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function run(array $parameters)
6363
{
6464
$projectName = $this->getOption(['name', 1], null, 'default');
6565
$projectType = $this->getOption(['type', 2], null, 'simple');
66-
$projectPath = $this->getOption(['directory', 3]);
66+
$projectPath = $this->getOption(['directory', 3], null, ".");
6767
$templatePath = $this->getOption(['template-path'], null, TEMPLATE_PATH);
6868
$enableWebtools = $this->getOption(['enable-webtools', 4], null, false);
6969
$useConfigIni = $this->getOption('use-config-ini');

scripts/Phalcon/Devtools/Version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ class Version extends PhVersion
3939
*/
4040
protected static function _getVersion()
4141
{
42-
return [3, 4, 0, 4, 0];
42+
return [3, 4, 5, 0, 0];
4343
}
4444
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

tests/console/GenerateProjectCept.php

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
/**
4+
* @var Codeception\Scenario $scenario
5+
*/
6+
7+
$I = new ConsoleTester($scenario);
8+
$I->wantToTest('Generating project');
9+
10+
$output=<<<OUT
11+
Success: Project was successfully created.
12+
OUT;
13+
14+
$projectsFolder = 'projects';
15+
chmod(app_path($projectsFolder), 0777);
16+
17+
$I->amInPath(app_path($projectsFolder));
18+
19+
/**
20+
* Case 1 - default path
21+
*/
22+
$projectName1 = 'project-tests1';
23+
$path1 = $projectsFolder . '/' . $projectName1;
24+
25+
$I->dontSeeFileFound(app_path($path1));
26+
$I->runShellCommand('phalcon project ' . $projectName1);
27+
$I->seeFileFound(app_path($path1));
28+
$I->deleteDir(app_path($path1));
29+
30+
/**
31+
* Case 2 - custom path
32+
*/
33+
$projectName2 = 'project-tests2';
34+
$projectPath2 = 'project-tests2-custom';
35+
$path2 = $projectsFolder . '/' . $projectPath2;
36+
37+
$I->dontSeeFileFound(app_path($path2));
38+
$I->runShellCommand("phalcon project $projectName2 simple $projectPath2");
39+
$I->seeFileFound(app_path($path2));
40+
$I->deleteDir(app_path($path2));

0 commit comments

Comments
 (0)