Add travis-ci.org configuration
authorChristian Weiske <cweiske@cweiske.de>
Fri, 18 Sep 2015 19:58:58 +0000 (21:58 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Fri, 18 Sep 2015 19:58:58 +0000 (21:58 +0200)
.travis.yml [new file with mode: 0644]
README.rst
tests/Lib/Converter/HtmlTest.php
tests/data/formattest.html
tests/data/xss.html

diff --git a/.travis.yml b/.travis.yml
new file mode 100644 (file)
index 0000000..cd5a315
--- /dev/null
@@ -0,0 +1,10 @@
+language: php
+sudo: false
+php:
+  - 7
+  - 5.6
+  - 5.5
+  - 5.4
+script:
+  - cd tests
+  - phpunit .
index 22aa44abc5b38a5123dfa98cb948ac7c2694ef34..2b7bd62a903ab1e14ab29e52c6f084495290b95e 100644 (file)
@@ -155,6 +155,18 @@ Development hints
   incremented by 1.
 
 
   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:
 Releasing grauphel
 ==================
 To release a new version, do the following:
index 0a66ee45c7f5374a10d3231435a157699a5e746d..b02e39c790523605b8a28d06205892e485459508 100644 (file)
@@ -1,4 +1,5 @@
 <?php
 <?php
+require_once __DIR__ . '/../../../lib/converter/base.php';
 require_once __DIR__ . '/../../../lib/converter/html.php';
 
 class Lib_Converter_HtmlTest extends PHPUnit_Framework_TestCase
 require_once __DIR__ . '/../../../lib/converter/html.php';
 
 class Lib_Converter_HtmlTest extends PHPUnit_Framework_TestCase
@@ -7,7 +8,7 @@ class Lib_Converter_HtmlTest extends PHPUnit_Framework_TestCase
     {
         $input = file_get_contents(__DIR__ . '/../../data/formattest.tomboynotecontent');
 
     {
         $input = file_get_contents(__DIR__ . '/../../data/formattest.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/formattest.html'),
         $output = $converter->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');
 
     {
         $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'),
         $output = $converter->convert($input);
         $this->assertEquals(
             file_get_contents(__DIR__ . '/../../data/xss.html'),
index 5bc3709f922e93f49345cf68d4697d5263d978c3..a7dbe14dcb75101e2dbdc8bffd21e01c1f196559 100644 (file)
@@ -20,7 +20,7 @@ Formatierungen:<br />
 <i>Kursiver Text</i><br />
 <span class="strikethrough">Durchgestrichener Text</span><br />
 <span class="highlight">Hervorgehobener Text</span><br />
 <i>Kursiver Text</i><br />
 <span class="strikethrough">Durchgestrichener Text</span><br />
 <span class="highlight">Hervorgehobener Text</span><br />
-<tt>Feste Breite</tt><br />
+<span style="font-family:monospace; white-space: pre-wrap">Feste Breite</span><br />
 <br />
 Schriftgrößen:<br />
 <span class="small">klein</span><br />
 <br />
 Schriftgrößen:<br />
 <span class="small">klein</span><br />
index 1908ce2e8aa840d750c53f2fbfd9c0c4dddbcd3e..98551bf461761caa7a2d8d24236d60e2d050cca0 100644 (file)
@@ -4,8 +4,8 @@ Was ist denn &lt;a href=&quot;foo&quot;&gt;bar<br />
 Link mit fett drin: <a href="Formattest.htm">Format<b>te</b>st</a>.<br />
 <ul><li>Liste<br />
 </li><li>ein <b>bisschen</b> fett<br />
 Link mit fett drin: <a href="Formattest.htm">Format<b>te</b>st</a>.<br />
 <ul><li>Liste<br />
 </li><li>ein <b>bisschen</b> fett<br />
-</li><li>mo<tt>nospac</tt>ed<br />
+</li><li>mo<span style="font-family:monospace; white-space: pre-wrap">nospac</span>ed<br />
 </li><li>&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</li></ul>
 <br />
 </li><li>&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</li></ul>
 <br />
-Link zum <a href="Formattest.htm"><span class="highlight">Form</span>a<tt>tt</tt>e<span class="huge">st</span></a>.<br />
+Link zum <a href="Formattest.htm"><span class="highlight">Form</span>a<span style="font-family:monospace; white-space: pre-wrap">tt</span>e<span class="huge">st</span></a>.<br />
 Link mit <a href="Sonder&quot;&gt;zeichen.htm">Sonder&quot;&gt;zeichen</a>.<br />
 Link mit <a href="Sonder&quot;&gt;zeichen.htm">Sonder&quot;&gt;zeichen</a>.<br />