@@ -130,7 +130,33 @@ public function testContratOther($localobject)
130
130
print __METHOD__ ." localobject->date_creation= " .$ localobject ->date_creation ."\n" ;
131
131
$ this ->assertNotEquals ($ localobject ->date_creation , '' );
132
132
133
- return $ localobject ->id ;
133
+ return $ localobject ;
134
+ }
135
+
136
+ /**
137
+ * testContratUpdate
138
+ *
139
+ * @param Contrat $localobject Object contract
140
+ * @return int
141
+ *
142
+ * @depends testContratOther
143
+ * The depends says test is run only if previous is ok
144
+ */
145
+ public function testContratUpdate ($ localobject )
146
+ {
147
+ global $ conf ,$ user ,$ langs ,$ db ;
148
+ $ conf = $ this ->savconf ;
149
+ $ user = $ this ->savuser ;
150
+ $ langs = $ this ->savlangs ;
151
+ $ db = $ this ->savdb ;
152
+
153
+ $ localobject ->note_private = 'New private note ' ;
154
+
155
+ $ result = $ localobject ->update ($ user );
156
+
157
+ print __METHOD__ ." id= " .$ localobject ->id ." result= " .$ result ."\n" ;
158
+ $ this ->assertLessThan ($ result , 0 );
159
+ return $ result ;
134
160
}
135
161
136
162
/**
@@ -139,7 +165,7 @@ public function testContratOther($localobject)
139
165
* @param int $id Id of contract
140
166
* @return int
141
167
*
142
- * @depends testContratOther
168
+ * @depends testContratUpdate
143
169
* The depends says test is run only if previous is ok
144
170
*/
145
171
public function testContratDelete ($ id )
0 commit comments