From 99a5bc1cc8465cbb3cac8a691ad5935af0e38840 Mon Sep 17 00:00:00 2001 From: Bob Date: Tue, 29 Nov 2016 14:51:23 +0100 Subject: [PATCH] added build tests (wip) --- .travis.yml | 8 ++++++++ build/logs/junit-unittests.xml | 2 ++ composer.json | 3 ++- phpunit.xml | 15 +++++++++++++++ tests/apiUnitTest.php | 17 +++++++++++++++++ tests/init.php | 4 ++++ 6 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 .travis.yml create mode 100644 build/logs/junit-unittests.xml create mode 100644 phpunit.xml create mode 100644 tests/apiUnitTest.php create mode 100644 tests/init.php diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..ed5ca56 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +language: php + +php: +- 5.3 +- 5.4 +- 5.5 +- 5.6 +- 7.0 diff --git a/build/logs/junit-unittests.xml b/build/logs/junit-unittests.xml new file mode 100644 index 0000000..dfe6416 --- /dev/null +++ b/build/logs/junit-unittests.xml @@ -0,0 +1,2 @@ + + diff --git a/composer.json b/composer.json index 5d13831..ba33da1 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,8 @@ "php": ">=5.3" }, "require-dev": { - "phpunit/phpunit": "^3.7 || ^4.8 || ^5.4" + "phpunit/phpunit": "^3.7 || ^4.8 || ^5.4", + "phpdocumentor/phpdocumentor": "2.*" }, "autoload": { "psr-4": { diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 0000000..e0772c1 --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,15 @@ + + + + + + + + tests/ + + + + src/ + + + diff --git a/tests/apiUnitTest.php b/tests/apiUnitTest.php new file mode 100644 index 0000000..0c654e1 --- /dev/null +++ b/tests/apiUnitTest.php @@ -0,0 +1,17 @@ +setLanguage( 'nl' ); + $oCardGate->version()->setPlatformName( 'PHP' ); + $oCardGate->version()->setPlatformVersion( phpversion() ); + $oCardGate->version()->setPluginName( 'Test Implementation' ); + $oCardGate->version()->setPluginVersion( '0.0.1' ); + } + +} diff --git a/tests/init.php b/tests/init.php new file mode 100644 index 0000000..5ce9421 --- /dev/null +++ b/tests/init.php @@ -0,0 +1,4 @@ +