]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #5049 fixed and formatted unit test
authorcash <cash.costello@gmail.com>
Sat, 20 Apr 2013 16:24:45 +0000 (12:24 -0400)
committercash <cash.costello@gmail.com>
Sat, 20 Apr 2013 16:24:45 +0000 (12:24 -0400)
mod/htmlawed/start.php
mod/htmlawed/tests/tags.php

index 12b6470a3ef43289f21f127def3df7e86712fe05..25a70a4aac5e1e11b2ea671d8698e6d429db8516 100644 (file)
@@ -156,10 +156,8 @@ function htmlawed_tag_post_processor($element, $attributes = false) {
  * Runs unit tests for htmlawed
  *
  * @return array
- *  */
+ */
 function htmlawed_test($hook, $type, $value, $params) {
-    global $CONFIG;
-
     $value[] = dirname(__FILE__) . '/tests/tags.php';
     return $value;
 }
index b3914a9d64f40fd6b5f6bbd549b12b05eb423ba6..05fe829f4497ac17f7fba9c8c5204748a88713c3 100644 (file)
@@ -1,45 +1,47 @@
 <?php
+
 /**
  * Dupplicated tags in htmlawed
  */
 class HtmLawedDuplicateTagsTest extends ElggCoreUnitTest {
 
-    /**
-     * Called before each test object.
-     */
-    public function __construct() {
-        parent::__construct();
-    }
-    
-    /**
-     * Called before each test method.
-     */
-    public function setUp() {
-    }
-    
-    /**
-     * Called after each test method.
-     */
-    public function tearDown() {
-        // do not allow SimpleTest to interpret Elgg notices as exceptions
-        $this->swallowErrors();
-    }
-    
-    /**
-     * Called after each test object.
-     */
-    public function __destruct() {
-        elgg_set_ignore_access($this->ia);
-        // all __destruct() code should go above here
-        parent::__destruct();
-    }
-    
-    public function testNotDuplicateTags() {
-        $filter_html = '<ul><li>item</li></ul>';    
-        set_input('test', $filter_html);
-        
-        $expected = $filter_html;
-        $result = get_input('test');
-        $this->assertEqual($result, $expected);
-    }
+       /**
+        * Called before each test object.
+        */
+       public function __construct() {
+               parent::__construct();
+       }
+
+       /**
+        * Called before each test method.
+        */
+       public function setUp() {
+               
+       }
+
+       /**
+        * Called after each test method.
+        */
+       public function tearDown() {
+               // do not allow SimpleTest to interpret Elgg notices as exceptions
+               $this->swallowErrors();
+       }
+
+       /**
+        * Called after each test object.
+        */
+       public function __destruct() {
+               // all __destruct() code should go above here
+               parent::__destruct();
+       }
+
+       public function testNotDuplicateTags() {
+               $filter_html = '<ul><li>item</li></ul>';
+               set_input('test', $filter_html);
+
+               $expected = $filter_html;
+               $result = get_input('test');
+               $this->assertEqual($result, $expected);
+       }
+
 }
\ No newline at end of file