1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-29 11:00:10 +02:00

[tests] Add unit test for bridge implementation

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.
This commit is contained in:
logmanoriginal
2018-08-05 00:39:53 +02:00
parent df81fa62d1
commit 6bceb2b2db
3 changed files with 215 additions and 0 deletions

16
phpunit.xml Normal file
View File

@@ -0,0 +1,16 @@
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.5/phpunit.xsd"
colors="true"
processIsolation="false"
timeoutForSmallTests="1"
timeoutForMediumTests="1"
timeoutForLargeTests="6" >
<testsuites>
<testsuite name="Standard test suite">
<file>tests/BridgeImplementationTest.php</file>
</testsuite>
</testsuites>
</phpunit>