浏览代码

Add unit test

Laurent Destailleur 4 年之前
父节点
当前提交
e172e82f0c
共有 1 个文件被更改,包括 3 次插入8 次删除
  1. 3 8
      test/phpunit/UserGroupTest.php

+ 3 - 8
test/phpunit/UserGroupTest.php

@@ -257,15 +257,10 @@ class UserGroupTest extends PHPUnit\Framework\TestCase
         $langs=$this->savlangs;
         $db=$this->savdb;
 
-        /*$result=$localobject->setstatus(0);
-        print __METHOD__." id=".$localobject->id." result=".$result."\n";
-        $this->assertLessThan($result, 0);
-        */
+        $result = $localobject->generateDocument('templatenamethadoesnotexist', $langs);
+        print __METHOD__." result=".$result."\n";
+        $this->assertEquals(-1, $result, 'Calling generateDocument with a not existing template should return 0');
 
-        /*$localobject->info($localobject->id);
-        print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n";
-        $this->assertNotEquals($localobject->date_creation, '');
-        */
         return $localobject->id;
     }