From aa7df24a4953126a39d3c1b4e6762ec7bf353571 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 22 Jul 2010 12:16:58 -0600 Subject: [PATCH] Convert the rest of Text_Filter tests to PHPUnit. --- framework/Text_Filter/package.xml | 15 +- .../test/Horde/Text/Filter/EmailsTest.php | 39 ++ .../test/Horde/Text/Filter/EnvironmentTest.php | 35 ++ .../test/Horde/Text/Filter/Html2textTest.php | 448 +++++++++++++++++++++ .../test/Horde/Text/Filter/Space2htmlTest.php | 53 +++ .../test/Horde/Text/Filter/Text2htmlTest.php | 107 +++++ .../Text_Filter/test/Horde/Text/Filter/emails.phpt | 40 -- .../test/Horde/Text/Filter/environment.phpt | 31 -- .../test/Horde/Text/Filter/fixtures/html2text.html | 176 -------- .../test/Horde/Text/Filter/fixtures/text2html.txt | 9 - .../test/Horde/Text/Filter/html2text.phpt | 155 ------- .../test/Horde/Text/Filter/html2text2.phpt | 37 -- .../test/Horde/Text/Filter/html2text3.phpt | 66 --- .../test/Horde/Text/Filter/space2html.phpt | 29 -- .../test/Horde/Text/Filter/text2html.phpt | 94 ----- 15 files changed, 687 insertions(+), 647 deletions(-) create mode 100644 framework/Text_Filter/test/Horde/Text/Filter/EmailsTest.php create mode 100644 framework/Text_Filter/test/Horde/Text/Filter/EnvironmentTest.php create mode 100644 framework/Text_Filter/test/Horde/Text/Filter/Html2textTest.php create mode 100644 framework/Text_Filter/test/Horde/Text/Filter/Space2htmlTest.php create mode 100644 framework/Text_Filter/test/Horde/Text/Filter/Text2htmlTest.php delete mode 100644 framework/Text_Filter/test/Horde/Text/Filter/emails.phpt delete mode 100644 framework/Text_Filter/test/Horde/Text/Filter/environment.phpt delete mode 100644 framework/Text_Filter/test/Horde/Text/Filter/fixtures/html2text.html delete mode 100644 framework/Text_Filter/test/Horde/Text/Filter/fixtures/text2html.txt delete mode 100644 framework/Text_Filter/test/Horde/Text/Filter/html2text.phpt delete mode 100644 framework/Text_Filter/test/Horde/Text/Filter/html2text2.phpt delete mode 100644 framework/Text_Filter/test/Horde/Text/Filter/html2text3.phpt delete mode 100644 framework/Text_Filter/test/Horde/Text/Filter/space2html.phpt delete mode 100644 framework/Text_Filter/test/Horde/Text/Filter/text2html.phpt diff --git a/framework/Text_Filter/package.xml b/framework/Text_Filter/package.xml index 201d4365c..62a4fd8d8 100644 --- a/framework/Text_Filter/package.xml +++ b/framework/Text_Filter/package.xml @@ -87,20 +87,15 @@ http://pear.php.net/dtd/package-2.0.xsd"> - - - - + + + + + - - - - - - diff --git a/framework/Text_Filter/test/Horde/Text/Filter/EmailsTest.php b/framework/Text_Filter/test/Horde/Text/Filter/EmailsTest.php new file mode 100644 index 000000000..583163d49 --- /dev/null +++ b/framework/Text_Filter/test/Horde/Text/Filter/EmailsTest.php @@ -0,0 +1,39 @@ + + * @category Horde + * @license http://www.fsf.org/copyleft/lgpl.html LGPL + * @package Text_Filter + * @subpackage UnitTests + */ + +class Horde_Text_Filter_EmailsTest extends PHPUnit_Framework_TestCase +{ + public function testEmails() + { + $tests = array( + 'Inline address test@example.com test.' => 'Inline address test@example.com test.', + 'Inline protocol mailto: test@example.com test with whitespace.' => 'Inline protocol mailto: test@example.com test with whitespace.', + 'Inline Outlook [mailto:test@example.com] test.' => 'Inline Outlook [mailto:test@example.com] test.', + 'Inline angle brackets test.' => 'Inline angle brackets <test@example.com> test.', + 'Inline angle brackets (HTML) <test@example.com> test.' => 'Inline angle brackets (HTML) <test@example.com> test.', + 'Inline angle brackets with mailto <mailto:test@example.com> test.' => 'Inline angle brackets with mailto <mailto:test@example.com> test.', + 'Inline with parameters test@example.com?subject=A%20subject&body=The%20message%20body test.' => 'Inline with parameters test@example.com?subject=A%20subject&body=The%20message%20body test.', + 'Inline protocol with parameters mailto:test@example.com?subject=A%20subject&body=The%20message%20body test.' => 'Inline protocol with parameters mailto:test@example.com?subject=A%20subject&body=The%20message%20body test.', + 'test@example.com in front test.' => 'test@example.com in front test.', + 'At end test of test@example.com' => 'At end test of test@example.com', + 'Don\'t link http://test@www.horde.org/ test.' => 'Don\'t link http://test@www.horde.org/ test.', + 'Real world example: mailto:pmx-auto-approve%2b27f0e770e2d85bf9bd8fea61f9dedbff@example.com?subject=Release%20message%20from%20quarantine&body=%5b%23ptn6Pw-1%5d' => 'Real world example: mailto:pmx-auto-approve%2b27f0e770e2d85bf9bd8fea61f9dedbff@example.com?subject=Release%20message%20from%20quarantine&body=%5b%23ptn6Pw-1%5d' + ); + + foreach ($tests as $key => $val) { + $filter = Horde_Text_Filter::filter($key, 'emails', array( + 'class' => 'pagelink' + )); + $this->assertEquals($val, $filter); + } + } + +} diff --git a/framework/Text_Filter/test/Horde/Text/Filter/EnvironmentTest.php b/framework/Text_Filter/test/Horde/Text/Filter/EnvironmentTest.php new file mode 100644 index 000000000..0a86ac0e3 --- /dev/null +++ b/framework/Text_Filter/test/Horde/Text/Filter/EnvironmentTest.php @@ -0,0 +1,35 @@ + + * @category Horde + * @license http://www.fsf.org/copyleft/lgpl.html LGPL + * @package Text_Filter + * @subpackage UnitTests + */ + +class Horde_Text_Filter_EnvironmentTest extends PHPUnit_Framework_TestCase +{ + public function testEnvironment() + { + $tests = array( + 'Simple line' => 'Simple line', + 'Inline %FOO% variable' => 'Inline bar variable', + '%FOO% at start' => 'bar at start', + 'at end %FOO%' => 'at end bar', + '# %COMMENT% line' => '', + 'Variable %FOO% with # comment %COMMENT%' => 'Variable bar with ', + 'Simple line' => 'Simple line' + ); + + putenv('COMMENT=comment'); + putenv('FOO=bar'); + + foreach ($tests as $key => $val) { + $filter = Horde_Text_Filter::filter($key, 'environment'); + $this->assertEquals($val, $filter); + } + } + +} diff --git a/framework/Text_Filter/test/Horde/Text/Filter/Html2textTest.php b/framework/Text_Filter/test/Horde/Text/Filter/Html2textTest.php new file mode 100644 index 000000000..0a71c2f13 --- /dev/null +++ b/framework/Text_Filter/test/Horde/Text/Filter/Html2textTest.php @@ -0,0 +1,448 @@ + + * @category Horde + * @license http://www.fsf.org/copyleft/lgpl.html LGPL + * @package Text_Filter + * @subpackage UnitTests + */ + +class Horde_Text_Filter_Html2textTest extends PHPUnit_Framework_TestCase +{ + public function testHtml2textVarious() + { + $html = <<Inline Formatting + + Some text with leading and trailing whitespace + +
+ +
+ +

Table

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeRepresentation
emphasis textemphasis text
strong textstrong text
italic textitalic text
bold textbold text
emphasis and strongemphasis and strong
underline textunderline text
+ +
+ + +

Links

+Horde Homepage
+Test User
+Some inline link.
+http://www.example.com
+ +
+ + +

Headings

+

You can make various levels of heading by putting equals-signs before and +after the text (all on its own line):

+ +

level 3 heading

+

level 4 heading

+ +
level 5 heading
+
level 6 heading
+ +
+ + +

Bullet Lists

+

You can create bullet lists by starting a paragraph with one or more +asterisks.

+ +
    +
  • Bullet one
      +
    • Sub-bullet
    • +
  • +
+ +

Numbered Lists

+

Similarly, you can create numbered lists by starting a paragraph with one +or more hashes.

+ +
    +
  1. Numero uno
  2. +
  3. Number two
      +
    1. Sub-item
    2. +
  4. + +
+ +

Mixing Bullet and Number List Items

+

You can mix and match bullet and number lists:

+ +
    +
  1. Number one
      +
    • Bullet
    • +
    • Bullet
    • +
  2. +
  3. Number two
      +
    • Bullet
    • +
    • Bullet
        +
      • Sub-bullet
          +
        1. Sub-sub-number
        2. +
        3. Sub-sub-number
        4. +
      • +
    • +
  4. +
  5. Number three
      +
    • Bullet
    • +
    • Bullet
    • +
  6. +
+ + +

Block quoting

+
+Horde Homepage
+Some inline link.
+
+ +Line inbetween. + +
+

Heading inside quoting

+

This is a paragraph inside a block quoting. The result should be several +lines prefixed with the > character.

+
+ + +

Special Characters

+ +
+ä +é +© +™ +Đ +
+ +

Zitat von John Doe <john.doe@example.com>:

+
+
+

Hallo lieber John,

+

+

Blah, blah.'

+

+

+
+
+

+

--
+Some signature
http://www.example.com

+ +

Zitat von Jane Doe <jane.doe@example.com>:

+
+Jan Schneider a écrit : + +
Zitat von Jane Doe +<jane.doe@example.com>: +

+
Hi, +

+I prepare the last "horde-webmail-1.2" for production level but I have +few questions: +
+- is there a way to disable "external_display_cal" in kronolith, I +don't want seeing birthdays calendars (turba) and task list (nag) +

+They aren't displayed by default, or do you mean you don't want them to +appear in the top right calendar panel? +
+
+Yes I don't want them to appear in the top right calendar panel but I +want user can create their external_cal
+

+

Jan.

+--
+Do you need professional PHP or Horde consulting?
http://horde.org/consulting/

+EOT; + + $text = << Horde Homepage[1] +> Some inline link[1]. + +Line inbetween. + +> HEADING INSIDE QUOTING +> +> +> This is a paragraph inside a block quoting. The result should be +> several lines prefixed with the > character. + +SPECIAL CHARACTERS + +ä é © ™ Đ + +Zitat von John Doe : + +> Hallo lieber John, +> +> Blah, blah.' + +-- + Some signature +http://www.example.com + +Zitat von Jane Doe : + +> Jan Schneider a écrit : +> > Zitat von Jane Doe [3]: +> > > Hi, +> > > +> > > I prepare the last "horde-webmail-1.2" for production level but +> > > I have few questions: +> > > - is there a way to disable "external_display_cal" in +> > > kronolith, I don't want seeing birthdays calendars (turba) and +> > > task list (nag) +> > They aren't displayed by default, or do you mean you don't want +> > them to appear in the top right calendar panel? +> Yes I don't want them to appear in the top right calendar panel but +> I want user can create their external_cal + +Jan. + + -- + Do you need professional PHP or Horde consulting? +http://horde.org/consulting/ + + +Links: +------ +[1] http://www.horde.org +[2] mailto:test@example.com +[3] mailto:jane.doe@example.com +EOT; + + $filter = Horde_Text_Filter::filter($html, 'Html2text', array( + 'charset' => 'UTF-8', + 'width' => 70 + )); + + $this->assertEquals($text, $filter); + } + + public function testHtml2textLinks() + { + $html = << +
  • This is a short line.
  • +
  • This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line.
  • +
  • And again a short line.
  • + +EOT; + + $text_wrap = << 50 + )); + $this->assertEquals($text_wrap, $filter); + + $filter = Horde_Text_Filter::filter($html, 'Html2text', array( + 'width' => 0 + )); + $this->assertEquals($text_nowrap, $filter); + } + + public function testHtml2textQuoting() + { + $html = <<Zitat von Roberto Maurizzi <roberto.maurizzi@gmail.com>:

    +
    +
    +
    +
    +
    +
    4) In Turba, I can select a VFS driver to use. Currently it is set to
    + +None and turba seems to be working fine. What does Turba use the VFS
    +for?
    +
    +

    +You can attach files to contacts with that.

    +Jan.
    +
    +

    +
    Anything similar for Kronolith, maybe in the new version?
    I've googled a little and only found a discussion in 2004 about having attachment (or links) from VFS in Kronolith.
    +I'd really like to be able to attach all my taxes forms to the day I have to pay them ;-) and more in general all the extra documentation regarding an appointment.

    Ciao,
      Roberto

    +
    +

    Some unquoted line with single ' quotes.

    +

    Jan.

    +--
    +Do you need professional PHP or Horde consulting?
    http://horde.org/consulting/

    +EOT; + + $text = <<: + +> > > > 4) In Turba, I can select a VFS driver to use. Currently it is +> > > > set to +> > > > None and turba seems to be working fine. What does Turba use +> > > > the VFS +> > > > for? +> > You can attach files to contacts with that. +> > +> > Jan. +> Anything similar for Kronolith, maybe in the new version? +> I've googled a little and only found a discussion in 2004 about +> having attachment (or links) from VFS in Kronolith. +> I'd really like to be able to attach all my taxes forms to the day +> I have to pay them ;-) and more in general all the extra +> documentation regarding an appointment. +> +> Ciao, +>   Roberto + +Some unquoted line with single ' quotes. + +Jan. + + -- + Do you need professional PHP or Horde consulting? +http://horde.org/consulting/ +EOT; + + $filter = Horde_Text_Filter::filter($html, 'Html2text', array( + 'width' => 70 + )); + $this->assertEquals($text, $filter); + } + +} diff --git a/framework/Text_Filter/test/Horde/Text/Filter/Space2htmlTest.php b/framework/Text_Filter/test/Horde/Text/Filter/Space2htmlTest.php new file mode 100644 index 000000000..3feeeca00 --- /dev/null +++ b/framework/Text_Filter/test/Horde/Text/Filter/Space2htmlTest.php @@ -0,0 +1,53 @@ + + * @category Horde + * @license http://www.fsf.org/copyleft/lgpl.html LGPL + * @package Text_Filter + * @subpackage UnitTests + */ + +class Horde_Text_Filter_Space2htmlTest extends PHPUnit_Framework_TestCase +{ + public function testSpace2html() + { + $spaces = array( + 'x x', + 'x x', + 'x x', + 'x x', + 'x x' + ); + + $results = array( + 'x x', + 'x  x', + 'x   x', + 'x        x', + 'x                x', + ); + + $results_encode_all = array( + 'x x', + 'x  x', + 'x   x', + 'x        x', + 'x                x' + ); + + foreach ($spaces as $key => $val) { + $filter = Horde_Text_Filter::filter($val, 'space2html', array( + 'encode_all' => false + )); + $this->assertEquals($results[$key], $filter); + + $filter = Horde_Text_Filter::filter($val, 'space2html', array( + 'encode_all' => true + )); + $this->assertEquals($results_encode_all[$key], $filter); + } + } + +} diff --git a/framework/Text_Filter/test/Horde/Text/Filter/Text2htmlTest.php b/framework/Text_Filter/test/Horde/Text/Filter/Text2htmlTest.php new file mode 100644 index 000000000..a5785db8c --- /dev/null +++ b/framework/Text_Filter/test/Horde/Text/Filter/Text2htmlTest.php @@ -0,0 +1,107 @@ + + * @category Horde + * @license http://www.fsf.org/copyleft/lgpl.html LGPL + * @package Text_Filter + * @subpackage UnitTests + */ + +class Horde_Text_Filter_Text2htmlTest extends PHPUnit_Framework_TestCase +{ + public function testText2html() + { + $tests = array( + 'http://www.horde.org/foo/', + 'https://jan:secret@www.horde.org/foo/', + 'mailto:jan@example.com', + 'svn+ssh://jan@svn.example.com/path/', + 'foo', + '', + 'http://www.horde.org/?foo=bar&baz=qux', + 'http://www..horde.org/', + 'http://www.2.horde.org/' + ); + + $levels = array( + Horde_Text_Filter_Text2html::PASSTHRU => array( + 'http://www.horde.org/foo/', + 'https://jan:secret@www.horde.org/foo/', + 'mailto:jan@example.com', + 'svn+ssh://jan@svn.example.com/path/', + 'foo', + '', + 'http://www.horde.org/?foo=bar&baz=qux', + 'http://www..horde.org/', + 'http://www.2.horde.org/', + ), + Horde_Text_Filter_Text2html::SYNTAX => array( + 'http://www.horde.org/foo/', + 'https://jan:secret@www.horde.org/foo/', + 'mailto:jan@example.com', + 'svn+ssh://jan@svn.example.com/path/', + '<tag>foo</tag>', + '<http://css.maxdesign.com.au/listamatic/>', + 'http://www.horde.org/?foo=bar&baz=qux', + 'http://www.<alert>.horde.org/', + 'http://www.&#x32;.horde.org/' + ), + Horde_Text_Filter_Text2html::MICRO => array( + 'http://www.horde.org/foo/', + 'https://jan:secret@www.horde.org/foo/', + 'mailto:jan@example.com', + 'svn+ssh://jan@svn.example.com/path/', + '<tag>foo</tag>', + '<http://css.maxdesign.com.au/listamatic/>', + 'http://www.horde.org/?foo=bar&baz=qux', + 'http://www.<alert>.horde.org/', + 'http://www.&#x32;.horde.org/' + ), + Horde_Text_Filter_Text2html::MICRO_LINKURL => array( + 'http://www.horde.org/foo/', + 'https://jan:secret@www.horde.org/foo/', + 'mailto:jan@example.com', + 'svn+ssh://jan@svn.example.com/path/', + '<tag>foo</tag>', + '<http://css.maxdesign.com.au/listamatic/>', + 'http://www.horde.org/?foo=bar&baz=qux', + 'http://www.<alert>.horde.org/', + 'http://www.&#x32;.horde.org/' + ), + Horde_Text_Filter_Text2html::NOHTML => array( + 'http://www.horde.org/foo/', + 'https://jan:secret@www.horde.org/foo/', + 'mailto:jan@example.com', + 'svn+ssh://jan@svn.example.com/path/', + '<tag>foo</tag>', + '<http://css.maxdesign.com.au/listamatic/>', + 'http://www.horde.org/?foo=bar&baz=qux', + 'http://www.<alert>.horde.org/', + 'http://www.&#x32;.horde.org/' + ), + Horde_Text_Filter_Text2html::NOHTML_NOBREAK => array( + 'http://www.horde.org/foo/', + 'https://jan:secret@www.horde.org/foo/', + 'mailto:jan@example.com', + 'svn+ssh://jan@svn.example.com/path/', + '<tag>foo</tag>', + '<http://css.maxdesign.com.au/listamatic/>', + 'http://www.horde.org/?foo=bar&baz=qux', + 'http://www.<alert>.horde.org/', + 'http://www.&#x32;.horde.org/' + ) + ); + + foreach ($levels as $level => $results) { + foreach ($tests as $key => $val) { + $filter = Horde_Text_Filter::filter($val, 'text2html', array( + 'parselevel' => $level + )); + $this->assertEquals($results[$key], $filter); + } + } + } + +} diff --git a/framework/Text_Filter/test/Horde/Text/Filter/emails.phpt b/framework/Text_Filter/test/Horde/Text/Filter/emails.phpt deleted file mode 100644 index 9f3992048..000000000 --- a/framework/Text_Filter/test/Horde/Text/Filter/emails.phpt +++ /dev/null @@ -1,40 +0,0 @@ ---TEST-- -Horde_Text_Filter_Email tests ---FILE-- - test. -Inline angle brackets (HTML) <test@example.com> test. -Inline angle brackets with mailto <mailto:test@example.com> test. -Inline with parameters test@example.com?subject=A%20subject&body=The%20message%20body test. -Inline protocol with parameters mailto:test@example.com?subject=A%20subject&body=The%20message%20body test. -test@example.com in front test. -At end test of test@example.com -Don't link http://test@www.horde.org/ test. -Real world example: mailto:pmx-auto-approve%2b27f0e770e2d85bf9bd8fea61f9dedbff@example.com?subject=Release%20message%20from%20quarantine&body=%5b%23ptn6Pw-1%5d -EOT; - -echo Horde_Text_Filter::filter($emails, 'emails', array('class' => 'pagelink')); - -?> ---EXPECT-- -Inline address test@example.com test. -Inline protocol mailto: test@example.com test with whitespace. -Inline Outlook [mailto:test@example.com] test. -Inline angle brackets <test@example.com> test. -Inline angle brackets (HTML) <test@example.com> test. -Inline angle brackets with mailto <mailto:test@example.com> test. -Inline with parameters test@example.com?subject=A%20subject&body=The%20message%20body test. -Inline protocol with parameters mailto:test@example.com?subject=A%20subject&body=The%20message%20body test. -test@example.com in front test. -At end test of test@example.com -Don't link http://test@www.horde.org/ test. -Real world example: mailto:pmx-auto-approve%2b27f0e770e2d85bf9bd8fea61f9dedbff@example.com?subject=Release%20message%20from%20quarantine&body=%5b%23ptn6Pw-1%5d diff --git a/framework/Text_Filter/test/Horde/Text/Filter/environment.phpt b/framework/Text_Filter/test/Horde/Text/Filter/environment.phpt deleted file mode 100644 index 05a6bc091..000000000 --- a/framework/Text_Filter/test/Horde/Text/Filter/environment.phpt +++ /dev/null @@ -1,31 +0,0 @@ ---TEST-- -Horde_Text_Filter_Environment tests ---FILE-- - ---EXPECT-- -Simple line -Inline bar variable -bar at start -at end bar -Variable bar with -Simple line diff --git a/framework/Text_Filter/test/Horde/Text/Filter/fixtures/html2text.html b/framework/Text_Filter/test/Horde/Text/Filter/fixtures/html2text.html deleted file mode 100644 index 7aecb3867..000000000 --- a/framework/Text_Filter/test/Horde/Text/Filter/fixtures/html2text.html +++ /dev/null @@ -1,176 +0,0 @@ -

    Inline Formatting

    - - Some text with leading and trailing whitespace - -
    - -
    - -

    Table

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TypeRepresentation
    emphasis textemphasis text
    strong textstrong text
    italic textitalic text
    bold textbold text
    emphasis and strongemphasis and strong
    underline textunderline text
    - -
    - - -

    Links

    -Horde Homepage
    -Test User
    -Some inline link.
    -http://www.example.com
    - -
    - - -

    Headings

    -

    You can make various levels of heading by putting equals-signs before and -after the text (all on its own line):

    - -

    level 3 heading

    -

    level 4 heading

    - -
    level 5 heading
    -
    level 6 heading
    - -
    - - -

    Bullet Lists

    -

    You can create bullet lists by starting a paragraph with one or more -asterisks.

    - -
      -
    • Bullet one
        -
      • Sub-bullet
      • -
    • -
    - -

    Numbered Lists

    -

    Similarly, you can create numbered lists by starting a paragraph with one -or more hashes.

    - -
      -
    1. Numero uno
    2. -
    3. Number two
        -
      1. Sub-item
      2. -
    4. - -
    - -

    Mixing Bullet and Number List Items

    -

    You can mix and match bullet and number lists:

    - -
      -
    1. Number one
        -
      • Bullet
      • -
      • Bullet
      • -
    2. -
    3. Number two
        -
      • Bullet
      • -
      • Bullet
          -
        • Sub-bullet
            -
          1. Sub-sub-number
          2. -
          3. Sub-sub-number
          4. -
        • -
      • -
    4. -
    5. Number three
        -
      • Bullet
      • -
      • Bullet
      • -
    6. -
    - - -

    Block quoting

    -
    -Horde Homepage
    -Some inline link.
    -
    - -Line inbetween. - -
    -

    Heading inside quoting

    -

    This is a paragraph inside a block quoting. The result should be several -lines prefixed with the > character.

    -
    - - -

    Special Characters

    - -
    -ä -é -© -™ -Đ -
    - -

    Zitat von John Doe <john.doe@example.com>:

    -
    -
    -

    Hallo lieber John,

    -

    -

    Blah, blah.'

    -

    -

    -
    -
    -

    -

    --
    -Some signature
    http://www.example.com

    - -

    Zitat von Jane Doe <jane.doe@example.com>:

    -
    -Jan Schneider a écrit : - -
    Zitat von Jane Doe -<jane.doe@example.com>: -

    -
    Hi, -

    -I prepare the last "horde-webmail-1.2" for production level but I have -few questions: -
    -- is there a way to disable "external_display_cal" in kronolith, I -don't want seeing birthdays calendars (turba) and task list (nag) -

    -They aren't displayed by default, or do you mean you don't want them to -appear in the top right calendar panel? -
    -
    -Yes I don't want them to appear in the top right calendar panel but I -want user can create their external_cal
    -

    -

    Jan.

    ---
    -Do you need professional PHP or Horde consulting?
    http://horde.org/consulting/

    diff --git a/framework/Text_Filter/test/Horde/Text/Filter/fixtures/text2html.txt b/framework/Text_Filter/test/Horde/Text/Filter/fixtures/text2html.txt deleted file mode 100644 index 550e1e7ed..000000000 --- a/framework/Text_Filter/test/Horde/Text/Filter/fixtures/text2html.txt +++ /dev/null @@ -1,9 +0,0 @@ -http://www.horde.org/foo/ -https://jan:secret@www.horde.org/foo/ -mailto:jan@example.com -svn+ssh://jan@svn.example.com/path/ -foo - -http://www.horde.org/?foo=bar&baz=qux -http://www..horde.org/ -http://www.2.horde.org/ diff --git a/framework/Text_Filter/test/Horde/Text/Filter/html2text.phpt b/framework/Text_Filter/test/Horde/Text/Filter/html2text.phpt deleted file mode 100644 index 30d596496..000000000 --- a/framework/Text_Filter/test/Horde/Text/Filter/html2text.phpt +++ /dev/null @@ -1,155 +0,0 @@ ---TEST-- -Horde_Text_Filter_Html2text tests ---FILE-- - 'UTF-8')); - -?> ---EXPECT-- -INLINE FORMATTING - -Some text with leading and trailing whitespace - -------------------------- - -TABLE - - TYPE REPRESENTATION - emphasis text /emphasis text/ - strong text STRONG TEXT - italic text /italic text/ - bold text BOLD TEXT - emphasis and strong /EMPHASIS AND STRONG/ - underline text _underline text_ - -------------------------- - -LINKS - -Horde Homepage[1] -Test User[2] -Some inline link[1]. -http://www.example.com - -------------------------- - -HEADINGS - -You can make various levels of heading by putting equals-signs before -and after the text (all on its own line): - -LEVEL 3 HEADING - -Level 4 Heading - -Level 5 Heading - -Level 6 Heading - -------------------------- - -BULLET LISTS - -You can create bullet lists by starting a paragraph with one or more -asterisks. - - * Bullet one - - * Sub-bullet - -NUMBERED LISTS - -Similarly, you can create numbered lists by starting a paragraph with -one or more hashes. - - * Numero uno - * Number two - - * Sub-item - -MIXING BULLET AND NUMBER LIST ITEMS - -You can mix and match bullet and number lists: - - * Number one - - * Bullet - * Bullet - - * Number two - - * Bullet - * Bullet - - * Sub-bullet - - * Sub-sub-number - * Sub-sub-number - - * Number three - - * Bullet - * Bullet - -BLOCK QUOTING - -> Horde Homepage[1] -> Some inline link[1]. - -Line inbetween. - -> HEADING INSIDE QUOTING -> -> -> This is a paragraph inside a block quoting. The result should be -> several lines prefixed with the > character. - -SPECIAL CHARACTERS - -ä é © ™ Đ - -Zitat von John Doe : - -> Hallo lieber John, -> -> Blah, blah.' - --- - Some signature -http://www.example.com - -Zitat von Jane Doe : - -> Jan Schneider a écrit : -> > Zitat von Jane Doe [3]: -> > > Hi, -> > > -> > > I prepare the last "horde-webmail-1.2" for production level but -> > > I have few questions: -> > > - is there a way to disable "external_display_cal" in -> > > kronolith, I don't want seeing birthdays calendars (turba) and -> > > task list (nag) -> > They aren't displayed by default, or do you mean you don't want -> > them to appear in the top right calendar panel? -> Yes I don't want them to appear in the top right calendar panel but -> I want user can create their external_cal - -Jan. - - -- - Do you need professional PHP or Horde consulting? -http://horde.org/consulting/ - - -Links: ------- -[1] http://www.horde.org -[2] mailto:test@example.com -[3] mailto:jane.doe@example.com diff --git a/framework/Text_Filter/test/Horde/Text/Filter/html2text2.phpt b/framework/Text_Filter/test/Horde/Text/Filter/html2text2.phpt deleted file mode 100644 index d766b758a..000000000 --- a/framework/Text_Filter/test/Horde/Text/Filter/html2text2.phpt +++ /dev/null @@ -1,37 +0,0 @@ ---TEST-- -Horde_Text_Filter_Html2text lists test ---FILE-- - -
  • This is a short line.
  • -
  • This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line.
  • -
  • And again a short line.
  • - -EOT; - -echo Horde_Text_Filter::filter($html, 'Html2text', array('wrap' => 50)); -echo "\n\n"; -echo Horde_Text_Filter::filter($html, 'Html2text', array('wrap' => false)); - -?> ---EXPECT-- - * This is a short line. - * This is a long line. This is a long line. This -is a long line. This is a long line. This is a -long line. This is a long line. This is a long -line. This is a long line. This is a long line. -This is a long line. This is a long line. This is -a long line. - * And again a short line. - - * This is a short line. - * This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. This is a long line. - * And again a short line. diff --git a/framework/Text_Filter/test/Horde/Text/Filter/html2text3.phpt b/framework/Text_Filter/test/Horde/Text/Filter/html2text3.phpt deleted file mode 100644 index 713ee97c9..000000000 --- a/framework/Text_Filter/test/Horde/Text/Filter/html2text3.phpt +++ /dev/null @@ -1,66 +0,0 @@ ---TEST-- -Horde_Text_Filter_Html2text quoting test ---FILE-- -Zitat von Roberto Maurizzi <roberto.maurizzi@gmail.com>:

    -
    -
    -
    -
    -
    -
    4) In Turba, I can select a VFS driver to use. Currently it is set to
    - -None and turba seems to be working fine. What does Turba use the VFS
    -for?
    -
    -

    -You can attach files to contacts with that.

    -Jan.
    -
    -

    -
    Anything similar for Kronolith, maybe in the new version?
    I've googled a little and only found a discussion in 2004 about having attachment (or links) from VFS in Kronolith.
    -I'd really like to be able to attach all my taxes forms to the day I have to pay them ;-) and more in general all the extra documentation regarding an appointment.

    Ciao,
      Roberto

    -
    -

    Some unquoted line with single ' quotes.

    -

    Jan.

    ---
    -Do you need professional PHP or Horde consulting?
    http://horde.org/consulting/

    -EOT; -echo Horde_Text_Filter::filter($html, 'html2text'); - -?> ---EXPECT-- -Zitat von Roberto Maurizzi : - -> > > > 4) In Turba, I can select a VFS driver to use. Currently it is -> > > > set to -> > > > None and turba seems to be working fine. What does Turba use -> > > > the VFS -> > > > for? -> > You can attach files to contacts with that. -> > -> > Jan. -> Anything similar for Kronolith, maybe in the new version? -> I've googled a little and only found a discussion in 2004 about -> having attachment (or links) from VFS in Kronolith. -> I'd really like to be able to attach all my taxes forms to the day -> I have to pay them ;-) and more in general all the extra -> documentation regarding an appointment. -> -> Ciao, ->   Roberto - -Some unquoted line with single ' quotes. - -Jan. - - -- - Do you need professional PHP or Horde consulting? -http://horde.org/consulting/ diff --git a/framework/Text_Filter/test/Horde/Text/Filter/space2html.phpt b/framework/Text_Filter/test/Horde/Text/Filter/space2html.phpt deleted file mode 100644 index 614e94f8c..000000000 --- a/framework/Text_Filter/test/Horde/Text/Filter/space2html.phpt +++ /dev/null @@ -1,29 +0,0 @@ ---TEST-- -Horde_Text_Filter_Space2html tests ---FILE-- - false)); - echo "\n"; - echo Horde_Text_Filter::filter($space, 'space2html', array('encode_all' => true)); - echo "\n"; -} - -?> ---EXPECT-- -x x -x x -x  x -x  x -x   x -x   x -x        x -x        x -x                x -x                x diff --git a/framework/Text_Filter/test/Horde/Text/Filter/text2html.phpt b/framework/Text_Filter/test/Horde/Text/Filter/text2html.phpt deleted file mode 100644 index d462aa000..000000000 --- a/framework/Text_Filter/test/Horde/Text/Filter/text2html.phpt +++ /dev/null @@ -1,94 +0,0 @@ ---TEST-- -Horde_Text_Filter_Text2html tests ---FILE-- - null); -$levels = array(Horde_Text_Filter_Text2html::PASSTHRU, - Horde_Text_Filter_Text2html::SYNTAX, - Horde_Text_Filter_Text2html::MICRO, - Horde_Text_Filter_Text2html::MICRO_LINKURL, - Horde_Text_Filter_Text2html::NOHTML, - Horde_Text_Filter_Text2html::NOHTML_NOBREAK); - -foreach ($levels as $level) { - $params['parselevel'] = $level; - echo Horde_Text_Filter::filter($text, 'text2html', $params); - echo "-------------------------------------------------\n"; -} - -?> ---EXPECT-- -http://www.horde.org/foo/ -https://jan:secret@www.horde.org/foo/ -mailto:jan@example.com -svn+ssh://jan@svn.example.com/path/ -foo - -http://www.horde.org/?foo=bar&baz=qux -http://www..horde.org/ -http://www.2.horde.org/ -------------------------------------------------- -http://www.horde.org/foo/
    -https://jan:secret@www.horde.org/foo/
    -mailto:jan@example.com
    -svn+ssh://jan@svn.example.com/path/
    -<tag>foo</tag>
    -<http://css.maxdesign.com.au/listamatic/>
    -http://www.horde.org/?foo=bar&baz=qux
    -http://www.<alert>.horde.org/
    -http://www.&#x32;.horde.org/
    -------------------------------------------------- -http://www.horde.org/foo/
    -https://jan:secret@www.horde.org/foo/
    -mailto:jan@example.com
    -svn+ssh://jan@svn.example.com/path/
    -<tag>foo</tag>
    -<http://css.maxdesign.com.au/listamatic/>
    -http://www.horde.org/?foo=bar&baz=qux
    -http://www.<alert>.horde.org/
    -http://www.&#x32;.horde.org/
    -------------------------------------------------- -http://www.horde.org/foo/
    -https://jan:secret@www.horde.org/foo/
    -mailto:jan@example.com
    -svn+ssh://jan@svn.example.com/path/
    -<tag>foo</tag>
    -<http://css.maxdesign.com.au/listamatic/>
    -http://www.horde.org/?foo=bar&baz=qux
    -http://www.<alert>.horde.org/
    -http://www.&#x32;.horde.org/
    -------------------------------------------------- -http://www.horde.org/foo/
    -https://jan:secret@www.horde.org/foo/
    -mailto:jan@example.com
    -svn+ssh://jan@svn.example.com/path/
    -<tag>foo</tag>
    -<http://css.maxdesign.com.au/listamatic/>
    -http://www.horde.org/?foo=bar&baz=qux
    -http://www.<alert>.horde.org/
    -http://www.&#x32;.horde.org/
    -------------------------------------------------- -http://www.horde.org/foo/ -https://jan:secret@www.horde.org/foo/ -mailto:jan@example.com -svn+ssh://jan@svn.example.com/path/ -<tag>foo</tag> -<http://css.maxdesign.com.au/listamatic/> -http://www.horde.org/?foo=bar&baz=qux -http://www.<alert>.horde.org/ -http://www.&#x32;.horde.org/ -------------------------------------------------- -- 2.11.0