From 14996257a299c79c013575b4d411d27980959140 Mon Sep 17 00:00:00 2001
From: Regis Houssin <regis@dolibarr.fr>
Date: Wed, 21 Mar 2012 11:44:04 +0100
Subject: [PATCH] Fix: try another method

---
 test/phpunit/CategorieTest.php | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/test/phpunit/CategorieTest.php b/test/phpunit/CategorieTest.php
index 895fec50781..de6c25455dc 100755
--- a/test/phpunit/CategorieTest.php
+++ b/test/phpunit/CategorieTest.php
@@ -136,8 +136,8 @@ class CategorieTest extends PHPUnit_Framework_TestCase
     	$this->assertGreaterThan(0, $result);
     	
     	// Save and unset $this->id for good check test
-    	$saveid = $localobject->id;
-    	unset($localobject->id);
+    	$saveid = (int) $localobject->id;
+    	$localobject->id = 0;
     	
     	// We check if exist
     	$result=$localobject->already_exists();
@@ -151,6 +151,7 @@ class CategorieTest extends PHPUnit_Framework_TestCase
     	
     	// Restore $this->id with save value
     	$localobject->id = $saveid;
+    	print __METHOD__." saveid=".$localobject->id."\n";
 
 
     	return $result;
-- 
GitLab