@@ -39,6 +39,8 @@ private function setTestForms() {
3939 'created ' => 12345 ,
4040 'expires ' => 0 ,
4141 'state ' => 0 ,
42+ 'lockedBy ' => null ,
43+ 'lockedUntil ' => null ,
4244 'is_anonymous ' => false ,
4345 'submit_multiple ' => false ,
4446 'allowEditSubmissions ' => false ,
@@ -163,6 +165,8 @@ private function setTestForms() {
163165 'created ' => 12345 ,
164166 'expires ' => 0 ,
165167 'state ' => 0 ,
168+ 'lockedBy ' => null ,
169+ 'lockedUntil ' => null ,
166170 'is_anonymous ' => false ,
167171 'submit_multiple ' => false ,
168172 'allowEditSubmissions ' => false ,
@@ -201,6 +205,8 @@ private function setTestForms() {
201205 'created ' => 12345 ,
202206 'expires ' => 0 ,
203207 'state ' => 0 ,
208+ 'lockedBy ' => null ,
209+ 'lockedUntil ' => null ,
204210 'is_anonymous ' => false ,
205211 'submit_multiple ' => false ,
206212 'allowEditSubmissions ' => false ,
@@ -288,6 +294,8 @@ public function dataGetForms() {
288294 'permissions ' => Constants::PERMISSION_ALL ,
289295 'partial ' => true ,
290296 'submissionCount ' => 3 ,
297+ 'lockedBy ' => null ,
298+ 'lockedUntil ' => null ,
291299 ],
292300 [
293301 'hash ' => 'zyxwvutsrq654321 ' ,
@@ -298,6 +306,8 @@ public function dataGetForms() {
298306 'permissions ' => Constants::PERMISSION_ALL ,
299307 'partial ' => true ,
300308 'submissionCount ' => 0 ,
309+ 'lockedBy ' => null ,
310+ 'lockedUntil ' => null ,
301311 ]
302312 ]
303313 ]
@@ -331,7 +341,9 @@ public function dataGetSharedForms() {
331341 'permissions ' => [
332342 'submit '
333343 ],
334- 'partial ' => true
344+ 'partial ' => true ,
345+ 'lockedBy ' => null ,
346+ 'lockedUntil ' => null ,
335347 ],
336348 ]
337349 ]
@@ -367,6 +379,8 @@ public function dataGetNewForm() {
367379 ],
368380 'expires ' => 0 ,
369381 'state ' => 0 ,
382+ 'lockedBy ' => null ,
383+ 'lockedUntil ' => null ,
370384 'isAnonymous ' => false ,
371385 'submitMultiple ' => false ,
372386 'allowEditSubmissions ' => false ,
@@ -427,6 +441,8 @@ public function dataGetFullForm() {
427441 ],
428442 'expires ' => 0 ,
429443 'state ' => 0 ,
444+ 'lockedBy ' => null ,
445+ 'lockedUntil ' => null ,
430446 'isAnonymous ' => false ,
431447 'submitMultiple ' => false ,
432448 'allowEditSubmissions ' => false ,
@@ -651,6 +667,8 @@ public function testUpdateFormProperties(array $expected): void {
651667 $ this ->assertEquals ($ this ->testForms [0 ]['id ' ], $ data );
652668
653669 $ expected ['lastUpdated ' ] = time ();
670+ $ expected ['lockedBy ' ] = 'test ' ;
671+ $ expected ['lockedUntil ' ] = time () + 900 ;
654672
655673 // Check if form equals updated form.
656674 $ this ->testGetFullForm ($ expected );
@@ -763,6 +781,8 @@ public function testUpdateQuestionProperties(array $fullFormExpected): void {
763781 $ this ->assertEquals ($ this ->testForms [0 ]['questions ' ][0 ]['id ' ], $ data );
764782
765783 $ fullFormExpected ['lastUpdated ' ] = time ();
784+ $ fullFormExpected ['lockedBy ' ] = 'test ' ;
785+ $ fullFormExpected ['lockedUntil ' ] = time () + 900 ;
766786
767787 // Check if form equals updated form.
768788 $ this ->testGetFullForm ($ fullFormExpected );
@@ -809,6 +829,8 @@ public function testReorderQuestions(array $fullFormExpected): void {
809829 ], $ data );
810830
811831 $ fullFormExpected ['lastUpdated ' ] = time ();
832+ $ fullFormExpected ['lockedBy ' ] = 'test ' ;
833+ $ fullFormExpected ['lockedUntil ' ] = time () + 900 ;
812834
813835 // Check if form equals updated form.
814836 $ this ->testGetFullForm ($ fullFormExpected );
@@ -839,6 +861,8 @@ public function testDeleteQuestion(array $fullFormExpected) {
839861 $ this ->assertEquals ($ this ->testForms [0 ]['questions ' ][0 ]['id ' ], $ data );
840862
841863 $ fullFormExpected ['lastUpdated ' ] = time ();
864+ $ fullFormExpected ['lockedBy ' ] = 'test ' ;
865+ $ fullFormExpected ['lockedUntil ' ] = time () + 900 ;
842866
843867 $ this ->testGetFullForm ($ fullFormExpected );
844868 }
@@ -924,6 +948,8 @@ public function testUpdateOptionProperties(array $fullFormExpected): void {
924948 $ this ->assertEquals ($ this ->testForms [0 ]['questions ' ][1 ]['options ' ][0 ]['id ' ], $ data );
925949
926950 $ fullFormExpected ['lastUpdated ' ] = time ();
951+ $ fullFormExpected ['lockedBy ' ] = 'test ' ;
952+ $ fullFormExpected ['lockedUntil ' ] = time () + 900 ;
927953
928954 // Check if form equals updated form.
929955 $ this ->testGetFullForm ($ fullFormExpected );
@@ -952,6 +978,8 @@ public function testDeleteOption(array $fullFormExpected) {
952978 $ this ->assertEquals ($ this ->testForms [0 ]['questions ' ][1 ]['options ' ][0 ]['id ' ], $ data );
953979
954980 $ fullFormExpected ['lastUpdated ' ] = time ();
981+ $ fullFormExpected ['lockedBy ' ] = 'test ' ;
982+ $ fullFormExpected ['lockedUntil ' ] = time () + 900 ;
955983 $ fullFormExpected ['questions ' ][1 ]['options ' ][0 ]['order ' ] = 1 ;
956984 $ fullFormExpected ['questions ' ][1 ]['options ' ][1 ]['order ' ] = 2 ;
957985
0 commit comments