-
Notifications
You must be signed in to change notification settings - Fork 10
Phpunit integration && PHP 7 update #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jclaveau
wants to merge
10
commits into
pear:trunk
Choose a base branch
from
jclaveau:phpunit_integration
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
1a2c2fc
Runable unit tests
jclaveau c758b71
Integrate PHPUnit
jclaveau 4c7482e
Integrate PHPUnit
jclaveau d5649aa
Create README.md
jclaveau b357331
Merge branch 'phpunit_integration' of github.com:jclaveau/Config into…
jclaveau a79bc0d
Hide tests titles
jclaveau ebe47a9
Support older PHP versions
jclaveau 8bc1d1b
Cleaner empty attributes checking
jclaveau 9521f0c
Clean phpunit.xml
jclaveau 8783674
Removing .phpunit.result.cache from .gitignore
jclaveau File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,3 +2,5 @@ | |
| composer.lock | ||
| composer.phar | ||
| vendor | ||
| tests/coverage | ||
| clover.xml | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,14 @@ | ||
| language: php | ||
| install: | ||
| - pear install -a package.xml | ||
| - composer install --prefer-dist --no-progress | ||
|
|
||
| php: | ||
| - 5.5 | ||
| script: phpunit test/ | ||
| - 5.6 | ||
| - 7.0 | ||
| - 7.1 | ||
| - 7.2 | ||
| - 7.3 | ||
| - 7.4 | ||
|
|
||
| script: | ||
| - vendor/bin/phpunit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Pear / Config | ||
| Configuration parsers for Apache, Ini files, PHP constants, Xml and generic .conf files. | ||
|
|
||
| [](https://travis-ci.org/pear/config) | ||
|
|
||
| ## Installation | ||
| Add the following to your composer.json: | ||
| ``` | ||
| { | ||
| "repositories": [ | ||
| { | ||
| "type": "vcs", | ||
| "url": "https://github.com/pear/Config" | ||
| "no-api": true | ||
| } | ||
| ], | ||
| "require": { | ||
| "pear/Config": "dev-master", | ||
| } | ||
| } | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| <?xml version="1.0" encoding="UTF-8" ?> | ||
| <phpunit backupGlobals="false" | ||
| defaultTestSuite="all_tests" | ||
| backupStaticAttributes="true" | ||
| colors="true" | ||
| bootstrap="./tests/bootstrap_phpunit.php" | ||
| > | ||
|
|
||
| <testsuites> | ||
| <!-- TODO defaultTestSuite will work with phpunit 6.1 --> | ||
| <testsuite name="all_tests"> | ||
| <directory>./tests/integration</directory> | ||
| <directory>./tests/legacy</directory> | ||
| </testsuite> | ||
| </testsuites> | ||
|
|
||
| <filter> | ||
| <!-- /!\ whitelist will exclude every outside class from coverage --> | ||
| <whitelist processUncoveredFilesFromWhitelist="true"> | ||
| <directory suffix=".php">./Config</directory> | ||
| </whitelist> | ||
| </filter> | ||
|
|
||
| <logging> | ||
| <log type="coverage-clover" target="clover.xml"/> | ||
| <log type="coverage-html" target="tests/coverage/"/> | ||
| </logging> | ||
| </phpunit> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
These should have went into your global .gitignore.
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.
tests/coverage and clover.xml are specified in the phpunit.xml. Are you sure they should be global?
Uh oh!
There was an error while loading. Please reload this page.
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.
I have
.phpunit.result.cachein pretty much in every other project. Two others are not belong here in the first place. E.g. you can put them into abuildfolder, then ignore it globally. Or add a local.gitignorewith a*in that folder. But I'm just nitpicking here. Great job!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.
I agree with you concerning
.phpunit.result.cachebut for the 2 others adding a dedicated folder which itself is ignored looks just as adding out of scope complexity. It could be necessary, if ever a full build process had to be configured, but later, when thebuildfolder would gather more stuff. And taking this in consideration here seems much less important than considering coverage for example.If you have an example of a build process applied to other Pear packages, I would follow it gladly. Is it the case?