Files
shields/services/travis/travis-php-version.tester.js
T
Paul MelnikowandGitHub 051e7d04c1 Rewrite [travisphpversion]; improve error message in expectBadge (#3352)
The change in `expectBadge` prints a more helpful error when `message` is empty.

Ref #2863
2019-04-23 23:03:21 -04:00

21 lines
721 B
JavaScript

'use strict'
const { isPhpVersionReduction } = require('../test-validators')
const t = (module.exports = require('../tester').createServiceTester())
t.create('gets the package version of symfony')
.get('/symfony/symfony.json')
.expectBadge({ label: 'php', message: isPhpVersionReduction })
t.create('gets the package version of symfony 2.8')
.get('/symfony/symfony/2.8.json')
.expectBadge({ label: 'php', message: isPhpVersionReduction })
t.create('gets the package version of yii')
.get('/yiisoft/yii.json')
.expectBadge({ label: 'php', message: isPhpVersionReduction })
t.create('invalid package name')
.get('/frodo/is-not-a-package.json')
.expectBadge({ label: 'php', message: 'repo not found' })