-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[PHP-Eye] Get tested PHP version from PHP-Eye #1372
Merged
Merged
Changes from 8 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
f80fbae
Merge remote-tracking branch 'shields/master'
peter-gribanov c167e59
add PHP version from PHP-Eye badge
peter-gribanov 7a15e25
test correct status
peter-gribanov cf3ad57
add badge example
peter-gribanov 1fe1d8a
remove php-v prefix
peter-gribanov b29c3d5
add not tested status test
peter-gribanov 18c1a23
can't reproduce 'not tested' error
peter-gribanov 2ea7176
rebuild
peter-gribanov 75e44e4
rename badge and add regex for test Symfony version
peter-gribanov 7f5c0cd
сщккусе regex
peter-gribanov a9ecb01
correct escape regex
peter-gribanov 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 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 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 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,22 @@ | ||
'use strict'; | ||
|
||
const ServiceTester = require('./runner/service-tester'); | ||
|
||
const t = new ServiceTester({ id: 'php-eye', title: 'PHP version from PHP-Eye' }); | ||
module.exports = t; | ||
|
||
t.create('gets the package version of symfony') | ||
.get('/symfony/symfony.json') | ||
.expectJSON({ name: 'Tested', value: '7.1' }); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's good that we have a test for the badge without a version because it ensures that code path is exercised. However I'm concerned this test will be brittle. Could you use a regex here instead of a constant |
||
|
||
t.create('gets the package version of symfony 2.8') | ||
.get('/symfony/symfony/v2.8.0.json') | ||
.expectJSON({ name: 'Tested', value: '5.3 - 7.0, HHVM' }); | ||
|
||
t.create('gets the package version of yii') | ||
.get('/yiisoft/yii.json') | ||
.expectJSON({ name: 'Tested', value: '5.3 - 7.1' }); | ||
|
||
t.create('invalid package name') | ||
.get('/frodo/is-not-a-package.json') | ||
.expectJSON({ name: 'Tested', value: 'invalid' }); |
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.
Since these keywords are included in the title, there's no need to list them.
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.
And why then did we mention them here?
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.
Perhaps it was missed. Those could be removed too. Might be good to automate this check in a unit test.