Browse Source

Fixed problems with the function teardown() CT#191

Arthur Portugal 15 years ago
parent
commit
e758a477ae
1 changed files with 10 additions and 0 deletions
  1. 10 0
      tests/main/forum/forumfunction.inc.test.php

+ 10 - 0
tests/main/forum/forumfunction.inc.test.php

@@ -2,6 +2,11 @@
 
 class TestForumFunction extends UnitTestCase {
 	
+	public function __construct() {
+		// The constructor acts like a global setUp for the class			
+		require_once api_get_path(SYS_TEST_PATH).'setup.inc.php';
+	}
+	
 	/**
 	 * This function add a attachment file into forum
 	 * @param string  a comment about file
@@ -1321,5 +1326,10 @@ class TestForumFunction extends UnitTestCase {
 		 $this->assertTrue(is_string($res));
 		 //var_dump($res); 	
 	 }
+	 
+	 public function __destruct() {
+		// The destructor acts like a global tearDown for the class			
+		require_once api_get_path(SYS_TEST_PATH).'teardown.inc.php';			
+	}
 }
 ?>