From 1795abfbadd6bfb02745f580bafd968ef82bb3b5 Mon Sep 17 00:00:00 2001 From: Arthur Portugal Date: Tue, 4 Aug 2009 12:12:21 -0500 Subject: [PATCH] Added last functions to hotpotatoes --- tests/main/exercice/hotpotatoes.lib.test.php | 32 +++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/tests/main/exercice/hotpotatoes.lib.test.php b/tests/main/exercice/hotpotatoes.lib.test.php index 3abe668bf4..f74275d151 100644 --- a/tests/main/exercice/hotpotatoes.lib.test.php +++ b/tests/main/exercice/hotpotatoes.lib.test.php @@ -149,15 +149,31 @@ class TestHotpotatoes extends UnitTestCase { //var_dump($res); } + function testReplaceImgTag() { + $content='src="test2.jpg"'; + $res=ReplaceImgTag($content); + $this->assertTrue(is_string($res)); + //var_dump($res); + } + function testSetComment() { + global $dbTable; + $path='/main/exercice'; + $comment='testing this function'; + $comment = Database::escape_string($comment); + $query = "UPDATE $dbTable set comment='$comment' where path='$path'"; + $result = api_sql_query($query,__FILE__,__LINE__); + $res=SetComment($path,$comment); + $this->assertTrue(is_string($res)); + //var_dump($resu); + } - - - - - - - - + function testWriteFileCont() { + $full_file_path='/main/exercice/'; + $content='test test test'; + $res=WriteFileCont($full_file_path,$content); + $this->assertTrue(is_bool($res)); + //var_dump($res); + } } ?>