diff --git a/tests/lib/template.php b/tests/lib/template.php
index 27feec13d044d2ba40459589b059eeac81317fde..0151ab331d1447402346cf816b23239b8a5b2526 100644
--- a/tests/lib/template.php
+++ b/tests/lib/template.php
@@ -31,7 +31,7 @@ class Test_TemplateFunctions extends UnitTestCase {
 		p($htmlString);
 		$result = ob_get_clean();
 
-		$this->assertEqual($result, "<script>alert('xss');</script>");
+		$this->assertEqual("<script>alert('xss');</script>", $result);
 
 		ob_end_clean();
 		$normalString = "This is a good string!";
@@ -39,7 +39,7 @@ class Test_TemplateFunctions extends UnitTestCase {
 		p($normalString);
 		$result = ob_get_clean();
 
-		$this->assertEqual($result, "This is a good string!");
+		$this->assertEqual("This is a good string!", $result);
 
 	}
 
@@ -51,7 +51,7 @@ class Test_TemplateFunctions extends UnitTestCase {
 		print_unescaped($htmlString);
 		$result = ob_get_clean();
 
-		$this->assertEqual($result, $htmlString);
+		$this->assertEqual($htmlString, $result);
 
 		ob_end_clean();
 		$normalString = "This is a good string!";
@@ -59,7 +59,7 @@ class Test_TemplateFunctions extends UnitTestCase {
 		p($normalString);
 		$result = ob_get_clean();
 
-		$this->assertEqual($result, "This is a good string!");
+		$this->assertEqual("This is a good string!", $result);
 
 	}