mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-23 10:05:32 +03:00
6bceb2b2db
Adds unit test for bridge implementations: - Custom functions must be in protected or private scope - getName() must return a valid string (non-empty) - getURI() must return a valid URI - Each bridge must define constants for NAME, URI, DESCRIPTION and MAINTAINER. CACHE_TIMEOUT and PARAMETERS are optional. The unit test is written for PHPUnit 6.x and will automatically be tested by Travis-CI for PHP 7.0 (see .travis.yml). Remarks: Unit tests for bridge data were scrapped in #378 for complexity reasons (tests would have to be maintained for each bridge). This unit test, however, is written for testing all bridges without taking specific implementation details into account.
38 lines
910 B
YAML
38 lines
910 B
YAML
dist: trusty
|
|
sudo: false
|
|
language: php
|
|
|
|
install:
|
|
- if [[ $TRAVIS_PHP_VERSION == "hhvm" ]]; then
|
|
composer global require squizlabs/PHP_CodeSniffer;
|
|
else
|
|
pear channel-update pear.php.net;
|
|
pear install PHP_CodeSniffer;
|
|
fi
|
|
- if [[ $TRAVIS_PHP_VERSION == "7.0" ]]; then
|
|
composer global require phpunit/phpunit ^6;
|
|
fi
|
|
|
|
script:
|
|
- phpenv rehash
|
|
- if [[ $TRAVIS_PHP_VERSION == "hhvm" ]]; then
|
|
/home/travis/.composer/vendor/bin/phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p;
|
|
else
|
|
phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p;
|
|
fi
|
|
- if [[ $TRAVIS_PHP_VERSION == "7.0" ]]; then
|
|
phpunit --configuration=phpunit.xml --include-path=lib/;
|
|
fi
|
|
|
|
matrix:
|
|
fast_finish: true
|
|
|
|
include:
|
|
- php: 5.6
|
|
- php: 7.0
|
|
- php: hhvm
|
|
- php: nightly
|
|
|
|
allow_failures:
|
|
- php: hhvm
|
|
- php: nightly
|