[TASK] Add unit test to cover stdWrap_debug 36/48736/3
authorElmar Hinz <t3elmar@gmail.com>
Wed, 29 Jun 2016 11:07:41 +0000 (13:07 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 6 Jul 2016 22:33:00 +0000 (00:33 +0200)
Releases: master
Resolves: #76855
Change-Id: I8cec0000a5d4b2c6b9a9f0aa10e918463daec3f9
Reviewed-on: https://review.typo3.org/48736
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php

index fc817f7..ceae053 100644 (file)
@@ -4667,9 +4667,10 @@ class ContentObjectRendererTest extends UnitTestCase
     }
 
     /**
-     * Check if char works properly
+     * Check if stdWrap_char works properly.
      *
      * @test
+     * @return void
      */
     public function stdWrap_char()
     {
@@ -4739,6 +4740,20 @@ class ContentObjectRendererTest extends UnitTestCase
             $subject->stdWrap_postUserFunc($content, $conf));
     }
 
+    /**
+     * Check if stdWrap_debug works properly.
+     *
+     * @test
+     * @return void
+     */
+    public function stdWrap_debug()
+    {
+        $expect = '<pre>&lt;p class=&quot;class&quot;&gt;&lt;br/&gt;'
+            . '&lt;/p&gt;</pre>';
+        $content = '<p class="class"><br/></p>';
+        $this->assertSame($expect, $this->subject->stdWrap_debug($content));
+    }
+
     ///////////////////////////////
     // Tests concerning getData()
     ///////////////////////////////