From 729cf0b66d9ccaf381a2150f75fb57c1c98c3b4c Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Fri, 18 Sep 2015 21:58:58 +0200 Subject: [PATCH] Add travis-ci.org configuration --- .travis.yml | 10 ++++++++++ README.rst | 12 ++++++++++++ tests/Lib/Converter/HtmlTest.php | 5 +++-- tests/data/formattest.html | 2 +- tests/data/xss.html | 4 ++-- 5 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..cd5a315 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,10 @@ +language: php +sudo: false +php: + - 7 + - 5.6 + - 5.5 + - 5.4 +script: + - cd tests + - phpunit . diff --git a/README.rst b/README.rst index 22aa44a..2b7bd62 100644 --- a/README.rst +++ b/README.rst @@ -155,6 +155,18 @@ Development hints incremented by 1. +Unit testing +============ +- `ownCloud unit testing documentation`__ +- `grauphel on Travis CI`__ + + .. image:: https://travis-ci.org/cweiske/grauphel.svg + :target: https://travis-ci.org/cweiske/grauphel + +__ https://doc.owncloud.org/server/8.0/developer_manual/core/unit-testing.html +__ https://travis-ci.org/cweiske/grauphel + + Releasing grauphel ================== To release a new version, do the following: diff --git a/tests/Lib/Converter/HtmlTest.php b/tests/Lib/Converter/HtmlTest.php index 0a66ee4..b02e39c 100644 --- a/tests/Lib/Converter/HtmlTest.php +++ b/tests/Lib/Converter/HtmlTest.php @@ -1,4 +1,5 @@ convert($input); $this->assertEquals( file_get_contents(__DIR__ . '/../../data/formattest.html'), @@ -19,7 +20,7 @@ class Lib_Converter_HtmlTest extends PHPUnit_Framework_TestCase { $input = file_get_contents(__DIR__ . '/../../data/xss.tomboynotecontent'); - $converter = new OCA\Grauphel\Lib\Converter\Html(); + $converter = new OCA\Grauphel\Converter\Html(); $output = $converter->convert($input); $this->assertEquals( file_get_contents(__DIR__ . '/../../data/xss.html'), diff --git a/tests/data/formattest.html b/tests/data/formattest.html index 5bc3709..a7dbe14 100644 --- a/tests/data/formattest.html +++ b/tests/data/formattest.html @@ -20,7 +20,7 @@ Formatierungen:
Kursiver Text
Durchgestrichener Text
Hervorgehobener Text
-Feste Breite
+Feste Breite

Schriftgrößen:
klein
diff --git a/tests/data/xss.html b/tests/data/xss.html index 1908ce2..98551bf 100644 --- a/tests/data/xss.html +++ b/tests/data/xss.html @@ -4,8 +4,8 @@ Was ist denn <a href="foo">bar
Link mit fett drin: Formattest.

-Link zum Formattest.
+Link zum Formattest.
Link mit Sonder">zeichen.
-- 2.30.2