@@ -340,9 +340,6 @@ public function test_smarty_assign_ppolicy()
340340 $ smarty ->shouldreceive ('assign ' )
341341 ->once ()
342342 ->with ("pwd_show_policy " , $ pwd_show_policy );
343- $ smarty ->shouldreceive ('assign ' )
344- ->once ()
345- ->with ("pwd_show_policy_onerror " , true );
346343
347344 foreach ($ pwd_policy_config as $ param => $ value ) {
348345 if ( isset ($ value ) )
@@ -368,65 +365,4 @@ public function test_smarty_assign_ppolicy()
368365
369366 }
370367
371- public function test_smarty_assign_ppolicy_show_policy_onerror ()
372- {
373-
374- $ pwd_policy_config = array ();
375-
376- $ smarty = Mockery::mock ('Smarty ' );
377- $ pwd_show_policy_pos = "above " ;
378- $ pwd_show_policy = "onerror " ;
379- $ result = "forbiddenchars " ;
380-
381- $ smarty ->shouldreceive ('assign ' )
382- ->once ()
383- ->with ("pwd_show_policy_pos " , $ pwd_show_policy_pos );
384- $ smarty ->shouldreceive ('assign ' )
385- ->once ()
386- ->with ("pwd_show_policy " , $ pwd_show_policy );
387- $ smarty ->shouldreceive ('assign ' )
388- ->twice ()
389- ->with ("pwd_show_policy_onerror " , true );
390-
391- $ smarty ->shouldreceive ('assign ' )
392- ->once ()
393- ->with ("json_policy " , base64_encode (json_encode ( $ pwd_policy_config )) );
394-
395- \Ltb \Ppolicy::smarty_assign_ppolicy ($ smarty , $ pwd_show_policy_pos , $ pwd_show_policy , $ result , $ pwd_policy_config );
396-
397- $ this ->assertNotNull ($ smarty , "smarty variable is null while testing smarty_assign_ppolicy " );
398-
399- }
400-
401- public function test_smarty_assign_ppolicy_show_policy_onerror_dummy ()
402- {
403-
404- $ pwd_policy_config = array ();
405-
406- $ smarty = Mockery::mock ('Smarty ' );
407- $ pwd_show_policy_pos = "above " ;
408- $ pwd_show_policy = "onerror " ;
409- $ result = "dummy " ;
410-
411- $ smarty ->shouldreceive ('assign ' )
412- ->once ()
413- ->with ("pwd_show_policy_pos " , $ pwd_show_policy_pos );
414- $ smarty ->shouldreceive ('assign ' )
415- ->once ()
416- ->with ("pwd_show_policy " , $ pwd_show_policy );
417- $ smarty ->shouldreceive ('assign ' )
418- ->with ("pwd_show_policy_onerror " , true );
419- $ smarty ->shouldreceive ('assign ' )
420- ->with ("pwd_show_policy_onerror " , false );
421-
422- $ smarty ->shouldreceive ('assign ' )
423- ->once ()
424- ->with ("json_policy " , base64_encode (json_encode ( $ pwd_policy_config )) );
425-
426- \Ltb \Ppolicy::smarty_assign_ppolicy ($ smarty , $ pwd_show_policy_pos , $ pwd_show_policy , $ result , $ pwd_policy_config );
427-
428- $ this ->assertNotNull ($ smarty , "smarty variable is null while testing smarty_assign_ppolicy " );
429-
430- }
431-
432368}
0 commit comments