-
Notifications
You must be signed in to change notification settings - Fork 113
Added some integration tests #183
Conversation
@@ -20,6 +20,10 @@ | |||
"symfony/filesystem": "~2.5", | |||
"raulfraile/distill": "~0.9,!=0.9.3,!=0.9.4" | |||
}, | |||
"require-dev": { | |||
"kherge/box": "~2.5", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, box should be installed separately (downloading their phar). Otherwise, you will get a bunch of unrelated deps in the phar (Box itself), and it makes things harder to test, as the phar should actually be built without dev deps (I hope the phar distributed for releases does not install dev dependencies in the phar)
@fabpot when you have some free time, please enable Travis for this repository. Thanks! |
@javiereguiluz done |
PHP Parse error: syntax error, unexpected '.', expecting ',' or ';' in /home/travis/build/symfony/symfony-installer/tests/Symfony/Installer/Tests/IntegrationTest.php on line 21
Tests are finally green! @stof do you have any other comment before the merge? Thanks! |
|
||
after_script: | ||
- rm box | ||
- rm symfony.phar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not needed. the Travis VM is deleted anyway
|
||
before_install: | ||
- composer self-update | ||
- curl -LSs http://box-project.github.io/box2/installer.php | php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could use https here, no ?
All comments have beeen addressed and tests are green. Merging! |
use Symfony\Component\Process\Exception\ProcessFailedException; | ||
use Symfony\Component\Process\ProcessUtils; | ||
|
||
class IntegrationTest extends \PHPUnit_Framework_TestCase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
technically, this is a functional test 😄
In #161 we discussed a bit about integration tests. I know that some people are not very fond of this kind of tests, but the Symfony Installer is a critical piece of our platform and it must always work as expected.
This pull request adds a test which actually builds the PHAR file and test all the different installer options (no Symfony version, special
lts
version, branch version, etc.) It also tests the Symfony Demo application installation. No mocks or tricks are used, so the test actually downloads all the real Symfony packages from the Internet.